~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/CodeGen/MachineLocation.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- llvm/CodeGen/MachineLocation.h --------------------------*- C++ -*-===//
 
2
//
 
3
//                     The LLVM Compiler Infrastructure
 
4
//
 
5
// This file is distributed under the University of Illinois Open Source
 
6
// License. See LICENSE.TXT for details.
 
7
//
 
8
//===----------------------------------------------------------------------===//
 
9
// The MachineLocation class is used to represent a simple location in a machine
 
10
// frame.  Locations will be one of two forms; a register or an address formed
 
11
// from a base address plus an offset.  Register indirection can be specified by
 
12
// using an offset of zero.
 
13
//
 
14
// The MachineMove class is used to represent abstract move operations in the 
 
15
// prolog/epilog of a compiled function.  A collection of these objects can be
 
16
// used by a debug consumer to track the location of values when unwinding stack
 
17
// frames.
 
18
//===----------------------------------------------------------------------===//
 
19
 
 
20
 
 
21
#ifndef LLVM_CODEGEN_MACHINELOCATION_H
 
22
#define LLVM_CODEGEN_MACHINELOCATION_H
 
23
 
 
24
namespace llvm {
 
25
 
 
26
class MachineLocation {
 
27
private:
 
28
  bool IsRegister;                      // True if location is a register.
 
29
  unsigned Register;                    // gcc/gdb register number.
 
30
  int Offset;                           // Displacement if not register.
 
31
 
 
32
public:
 
33
  enum {
 
34
    // The target register number for an abstract frame pointer. The value is
 
35
    // an arbitrary value greater than TargetRegisterInfo::FirstVirtualRegister.
 
36
    VirtualFP = ~0U
 
37
  };
 
38
  MachineLocation()
 
39
  : IsRegister(false)
 
40
  , Register(0)
 
41
  , Offset(0)
 
42
  {}
 
43
  explicit MachineLocation(unsigned R)
 
44
  : IsRegister(true)
 
45
  , Register(R)
 
46
  , Offset(0)
 
47
  {}
 
48
  MachineLocation(unsigned R, int O)
 
49
  : IsRegister(false)
 
50
  , Register(R)
 
51
  , Offset(O)
 
52
  {}
 
53
  
 
54
  // Accessors
 
55
  bool isReg()           const { return IsRegister; }
 
56
  unsigned getReg()      const { return Register; }
 
57
  int getOffset()        const { return Offset; }
 
58
  void setIsRegister(bool Is)  { IsRegister = Is; }
 
59
  void setRegister(unsigned R) { Register = R; }
 
60
  void setOffset(int O)        { Offset = O; }
 
61
  void set(unsigned R) {
 
62
    IsRegister = true;
 
63
    Register = R;
 
64
    Offset = 0;
 
65
  }
 
66
  void set(unsigned R, int O) {
 
67
    IsRegister = false;
 
68
    Register = R;
 
69
    Offset = O;
 
70
  }
 
71
 
 
72
#ifndef NDEBUG
 
73
  void dump();
 
74
#endif
 
75
};
 
76
 
 
77
class MachineMove {
 
78
private:
 
79
  unsigned LabelID;                     // Label ID number for post-instruction
 
80
                                        // address when result of move takes
 
81
                                        // effect.
 
82
  MachineLocation Destination;          // Move to location.
 
83
  MachineLocation Source;               // Move from location.
 
84
  
 
85
public:
 
86
  MachineMove()
 
87
  : LabelID(0)
 
88
  , Destination()
 
89
  , Source()
 
90
  {}
 
91
 
 
92
  MachineMove(unsigned ID, MachineLocation &D, MachineLocation &S)
 
93
  : LabelID(ID)
 
94
  , Destination(D)
 
95
  , Source(S)
 
96
  {}
 
97
  
 
98
  // Accessors
 
99
  unsigned getLabelID()                   const { return LabelID; }
 
100
  const MachineLocation &getDestination() const { return Destination; }
 
101
  const MachineLocation &getSource()      const { return Source; }
 
102
};
 
103
 
 
104
} // End llvm namespace
 
105
 
 
106
#endif