diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 09:16:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-08-26 09:16:46 +0000 |
commit | d644c32a52c36c2e52c91512d156d4332772cb1f (patch) | |
tree | 076b55429305c54413f37ac837cf351cd282d490 /include/llvm/MC | |
parent | b58a80440041407b1617e32db1ce83fa567991e9 (diff) | |
download | llvm-d644c32a52c36c2e52c91512d156d4332772cb1f.tar.gz llvm-d644c32a52c36c2e52c91512d156d4332772cb1f.tar.bz2 llvm-d644c32a52c36c2e52c91512d156d4332772cb1f.tar.xz |
llvm-mc: Make MCValue take const MCSymbol*s.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80078 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r-- | include/llvm/MC/MCValue.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/include/llvm/MC/MCValue.h b/include/llvm/MC/MCValue.h index af56eedece..9d71209f80 100644 --- a/include/llvm/MC/MCValue.h +++ b/include/llvm/MC/MCValue.h @@ -33,13 +33,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 { - MCSymbol *SymA, *SymB; + const MCSymbol *SymA, *SymB; int64_t Cst; public: int64_t getConstant() const { return Cst; } - MCSymbol *getSymA() const { return SymA; } - MCSymbol *getSymB() const { return SymB; } + const MCSymbol *getSymA() const { return SymA; } + const MCSymbol *getSymB() const { return SymB; } /// isAbsolute - Is this an absolute (as opposed to relocatable) value. bool isAbsolute() const { return !SymA && !SymB; } @@ -60,7 +60,8 @@ public: /// dump - Print the value to stderr. void dump() const; - static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) { + static MCValue get(const MCSymbol *SymA, const MCSymbol *SymB = 0, + int64_t Val = 0) { MCValue R; assert((!SymB || SymA) && "Invalid relocatable MCValue!"); R.Cst = Val; |