diff options
author | Kevin Enderby <enderby@apple.com> | 2010-09-30 17:16:09 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2010-09-30 17:16:09 +0000 |
commit | 3bb435301a2b5c901a993b0e151d05b596697038 (patch) | |
tree | 6a3d55c248b1b9d13d560a4025fb846f475a4558 /include/llvm/MC/MCAssembler.h | |
parent | 84d7ffdede03c17b68fdbd8d9a98b9e67e004712 (diff) |
Did my commit for the last patch for the .loc directory from the wrong place and
missed a bunch of files. Here the rest. Sorry about that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r-- | include/llvm/MC/MCAssembler.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h index 8d899d30d2..d48a0b40a7 100644 --- a/include/llvm/MC/MCAssembler.h +++ b/include/llvm/MC/MCAssembler.h @@ -49,7 +49,8 @@ public: FT_Data, FT_Fill, FT_Inst, - FT_Org + FT_Org, + FT_Dwarf }; private: @@ -337,6 +338,36 @@ public: static bool classof(const MCOrgFragment *) { return true; } }; +class MCDwarfLineAddrFragment : public MCFragment { + /// LineDelta - the value of the difference between the two line numbers + /// between two .loc dwarf directives. + int64_t LineDelta; + + /// AddrDelta - The expression for the difference of the two symbols that + /// make up the address delta between two .loc dwarf directives. + const MCExpr *AddrDelta; + +public: + MCDwarfLineAddrFragment(int64_t _LineDelta, const MCExpr &_AddrDelta, + MCSectionData *SD = 0) + : MCFragment(FT_Dwarf, SD), + LineDelta(_LineDelta), AddrDelta(&_AddrDelta) {} + + /// @name Accessors + /// @{ + + int64_t getLineDelta() const { return LineDelta; } + + const MCExpr &getAddrDelta() const { return *AddrDelta; } + + /// @} + + static bool classof(const MCFragment *F) { + return F->getKind() == MCFragment::FT_Dwarf; + } + static bool classof(const MCDwarfLineAddrFragment *) { return true; } +}; + // FIXME: Should this be a separate class, or just merged into MCSection? Since // we anticipate the fast path being through an MCAssembler, the only reason to // keep it out is for API abstraction. |