aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCValue.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-18 00:59:10 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-18 00:59:10 +0000
commit9a1d20042f6a6ec648a3588f9b13264a4570aab0 (patch)
tree57fc2bda07a314002464dd7eb03b25e372974ba5 /include/llvm/MC/MCValue.h
parentdaf97333697e1d243e531f4be648b1640d6a58bb (diff)
downloadexternal_llvm-9a1d20042f6a6ec648a3588f9b13264a4570aab0.tar.gz
external_llvm-9a1d20042f6a6ec648a3588f9b13264a4570aab0.tar.bz2
external_llvm-9a1d20042f6a6ec648a3588f9b13264a4570aab0.zip
MCValue: Change to holding MCSymbolRefExprs instead of MCSymbols, we will need this for accessing to symbol modifiers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98791 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCValue.h')
-rw-r--r--include/llvm/MC/MCValue.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/llvm/MC/MCValue.h b/include/llvm/MC/MCValue.h
index 8aa73f350f..11b6c2a17b 100644
--- a/include/llvm/MC/MCValue.h
+++ b/include/llvm/MC/MCValue.h
@@ -19,8 +19,9 @@
#include <cassert>
namespace llvm {
-class MCSymbol;
class MCAsmInfo;
+class MCSymbol;
+class MCSymbolRefExpr;
class raw_ostream;
/// MCValue - This represents an "assembler immediate". In its most general
@@ -34,13 +35,13 @@ class raw_ostream;
/// Note that this class must remain a simple POD value class, because we need
/// it to live in unions etc.
class MCValue {
- const MCSymbol *SymA, *SymB;
+ const MCSymbolRefExpr *SymA, *SymB;
int64_t Cst;
public:
int64_t getConstant() const { return Cst; }
- const MCSymbol *getSymA() const { return SymA; }
- const MCSymbol *getSymB() const { return SymB; }
+ const MCSymbolRefExpr *getSymA() const { return SymA; }
+ const MCSymbolRefExpr *getSymB() const { return SymB; }
/// isAbsolute - Is this an absolute (as opposed to relocatable) value.
bool isAbsolute() const { return !SymA && !SymB; }
@@ -57,11 +58,11 @@ public:
/// print - Print the value to the stream \arg OS.
void print(raw_ostream &OS, const MCAsmInfo *MAI) const;
-
+
/// dump - Print the value to stderr.
void dump() const;
- static MCValue get(const MCSymbol *SymA, const MCSymbol *SymB = 0,
+ static MCValue get(const MCSymbolRefExpr *SymA, const MCSymbolRefExpr *SymB=0,
int64_t Val = 0) {
MCValue R;
assert((!SymB || SymA) && "Invalid relocatable MCValue!");
@@ -70,7 +71,7 @@ public:
R.SymB = SymB;
return R;
}
-
+
static MCValue get(int64_t Val) {
MCValue R;
R.Cst = Val;
@@ -78,7 +79,7 @@ public:
R.SymB = 0;
return R;
}
-
+
};
} // end namespace llvm