diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-05-26 15:18:31 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-05-26 15:18:31 +0000 |
commit | 482ad802f1b1885542ea8a30e144a228a1526912 (patch) | |
tree | 0bc7fc0570babbdab48c3bb3cdaa5a04d9d52964 /include/llvm | |
parent | c9adb8c61e5dacdb340509ff6090cada1f4b591c (diff) | |
download | external_llvm-482ad802f1b1885542ea8a30e144a228a1526912.zip external_llvm-482ad802f1b1885542ea8a30e144a228a1526912.tar.gz external_llvm-482ad802f1b1885542ea8a30e144a228a1526912.tar.bz2 |
MC: Use accessors for access to MCAsmFixup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 7b2ce9c..c34042b 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -42,7 +42,6 @@ class TargetAsmBackend; // // FIXME: This should probably just be merged with MCFixup. class MCAsmFixup { -public: /// Offset - The offset inside the fragment which needs to be rewritten. uint64_t Offset; @@ -55,6 +54,13 @@ public: public: MCAsmFixup(uint64_t _Offset, const MCExpr &_Value, MCFixupKind _Kind) : Offset(_Offset), Value(&_Value), Kind(_Kind) {} + + MCFixupKind getKind() const { return MCFixupKind(Kind); } + + uint64_t getOffset() const { return Offset; } + void setOffset(uint64_t Value) { Offset = Value; } + + const MCExpr *getValue() const { return Value; } }; class MCFragment : public ilist_node<MCFragment> { @@ -150,7 +156,7 @@ public: void addFixup(MCAsmFixup Fixup) { // Enforce invariant that fixups are in offset order. - assert((Fixups.empty() || Fixup.Offset > Fixups.back().Offset) && + assert((Fixups.empty() || Fixup.getOffset() > Fixups.back().getOffset()) && "Fixups must be added in order!"); Fixups.push_back(Fixup); } |