LLVM: include/llvm/MC/MCValue.h Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_MC_MCVALUE_H

14#define LLVM_MC_MCVALUE_H

15

18

19namespace llvm {

20class raw_ostream;

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

38 int64_t Cst = 0;

40

41public:

47

48

49 bool isAbsolute() const { return !SymA && !SymB; }

50

51

53

54

55 void dump() const;

56

58

61 int64_t Val = 0, uint32_t RefKind = 0) {

63 R.Cst = Val;

64 R.SymA = SymA;

65 R.SymB = SymB;

66 R.RefKind = RefKind;

67 return R;

68 }

69

72 R.Cst = Val;

73 R.SymA = nullptr;

74 R.SymB = nullptr;

75 R.RefKind = 0;

76 return R;

77 }

78

79};

80

81}

82

83#endif

Represent a reference to a symbol from inside an expression.

This represents an "assembler immediate".

int64_t getConstant() const

uint32_t getRefKind() const

MCSymbolRefExpr::VariantKind getAccessVariant() const

static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=nullptr, int64_t Val=0, uint32_t RefKind=0)

const MCSymbolRefExpr * getSymB() const

void dump() const

Print the value to stderr.

static MCValue get(int64_t Val)

const MCSymbolRefExpr * getSymA() const

void print(raw_ostream &OS) const

Print the value to the stream OS.

bool isAbsolute() const

Is this an absolute (as opposed to relocatable) value.

This class implements an extremely fast bulk output stream that can only output to a stream.

This is an optimization pass for GlobalISel generic memory operations.