diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfUnit.h')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfUnit.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfUnit.h b/lib/CodeGen/AsmPrinter/DwarfUnit.h index f40c937..7a5e47d 100644 --- a/lib/CodeGen/AsmPrinter/DwarfUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfUnit.h @@ -14,17 +14,17 @@ #ifndef LLVM_LIB_CODEGEN_ASMPRINTER_DWARFUNIT_H #define LLVM_LIB_CODEGEN_ASMPRINTER_DWARFUNIT_H -#include "DIE.h" #include "DwarfDebug.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/Optional.h" #include "llvm/ADT/StringMap.h" #include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/DIE.h" #include "llvm/IR/DIBuilder.h" #include "llvm/IR/DebugInfo.h" +#include "llvm/MC/MCDwarf.h" #include "llvm/MC/MCExpr.h" #include "llvm/MC/MCSection.h" -#include "llvm/MC/MCDwarf.h" namespace llvm { @@ -138,6 +138,7 @@ public: } // Accessors. + AsmPrinter* getAsmPrinter() const { return Asm; } unsigned getUniqueID() const { return UniqueID; } uint16_t getLanguage() const { return CUNode.getLanguage(); } DICompileUnit getCUNode() const { return CUNode; } @@ -253,12 +254,16 @@ public: /// addTemplateParams - Add template parameters in buffer. void addTemplateParams(DIE &Buffer, DIArray TParams); - /// addRegisterOp - Add register operand. - void addRegisterOpPiece(DIELoc &TheDie, unsigned Reg, + /// \brief Add register operand. + /// \returns false if the register does not exist, e.g., because it was never + /// materialized. + bool addRegisterOpPiece(DIELoc &TheDie, unsigned Reg, unsigned SizeInBits = 0, unsigned OffsetInBits = 0); - /// addRegisterOffset - Add register offset. - void addRegisterOffset(DIELoc &TheDie, unsigned Reg, int64_t Offset); + /// \brief Add register offset. + /// \returns false if the register does not exist, e.g., because it was never + /// materialized. + bool addRegisterOffset(DIELoc &TheDie, unsigned Reg, int64_t Offset); // FIXME: Should be reformulated in terms of addComplexAddress. /// addBlockByrefAddress - Start with the address based on the location |