diff options
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 21 | ||||
-rw-r--r-- | include/llvm/MC/MCDwarf.h | 3 |
2 files changed, 8 insertions, 16 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 4f3223f5db..0fb3a8ce2d 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -352,13 +352,11 @@ class MCLEBFragment : public MCFragment { /// IsSigned - True if this is a sleb128, false if uleb128. bool IsSigned; - /// Size - The current size estimate. - uint64_t Size; - + SmallString<8> Contents; public: MCLEBFragment(const MCExpr &Value_, bool IsSigned_, MCSectionData *SD) : MCFragment(FT_LEB, SD), - Value(&Value_), IsSigned(IsSigned_), Size(1) {} + Value(&Value_), IsSigned(IsSigned_) { Contents.push_back(0); } /// @name Accessors /// @{ @@ -367,9 +365,8 @@ public: bool isSigned() const { return IsSigned; } - uint64_t getSize() const { return Size; } - - void setSize(uint64_t Size_) { Size = Size_; } + SmallString<8> &getContents() { return Contents; } + const SmallString<8> &getContents() const { return Contents; } /// @} @@ -388,14 +385,13 @@ class MCDwarfLineAddrFragment : public MCFragment { /// make up the address delta between two .loc dwarf directives. const MCExpr *AddrDelta; - /// Size - The current size estimate. - uint64_t Size; + SmallString<8> Contents; public: MCDwarfLineAddrFragment(int64_t _LineDelta, const MCExpr &_AddrDelta, MCSectionData *SD = 0) : MCFragment(FT_Dwarf, SD), - LineDelta(_LineDelta), AddrDelta(&_AddrDelta), Size(1) {} + LineDelta(_LineDelta), AddrDelta(&_AddrDelta) { Contents.push_back(0); } /// @name Accessors /// @{ @@ -404,9 +400,8 @@ public: const MCExpr &getAddrDelta() const { return *AddrDelta; } - uint64_t getSize() const { return Size; } - - void setSize(uint64_t Size_) { Size = Size_; } + SmallString<8> &getContents() { return Contents; } + const SmallString<8> &getContents() const { return Contents; } /// @} diff --git a/include/llvm/MC/MCDwarf.h b/include/llvm/MC/MCDwarf.h index e9fc0cf876..46177be230 100644 --- a/include/llvm/MC/MCDwarf.h +++ b/include/llvm/MC/MCDwarf.h @@ -220,9 +220,6 @@ namespace llvm { static void Emit(MCStreamer *MCOS, int64_t LineDelta,uint64_t AddrDelta); - /// Utility function to compute the size of the encoding. - static uint64_t ComputeSize(int64_t LineDelta, uint64_t AddrDelta); - /// Utility function to write the encoding to an object writer. static void Write(MCObjectWriter *OW, int64_t LineDelta, uint64_t AddrDelta); |