diff options
Diffstat (limited to 'llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h')
| -rw-r--r-- | llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h index 72cb0696b97..40ecaa98d05 100644 --- a/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h +++ b/llvm/unittests/DebugInfo/DWARF/DwarfGenerator.h @@ -89,6 +89,14 @@ public: /// \param U the unsigned integer to encode. void addAttribute(uint16_t Attr, dwarf::Form Form, uint64_t U); + /// Add an attribute value to be encoded as a DIEExpr + /// + /// \param Attr a dwarf::Attribute enumeration value or any uint16_t that + /// represents a user defined DWARF attribute. + /// \param Form the dwarf::Form to use when encoding the attribute. + /// \param Expr the MC expression used to compute the value. + void addAttribute(uint16_t Attr, dwarf::Form Form, const MCExpr &Expr); + /// Add an attribute value to be encoded as a DIEString or DIEInlinedString. /// /// \param Attr a dwarf::Attribute enumeration value or any uint16_t that @@ -123,6 +131,9 @@ public: /// \param S the size in bytes of the data pointed to by P . void addAttribute(uint16_t Attr, dwarf::Form Form, const void *P, size_t S); + /// Add a DW_AT_str_offsets_base attribute to this DIE. + void addStrOffsetsBaseAttribute(); + /// Add a new child to this DIE object. /// /// \param Tag the dwarf::Tag to assing to the llvm::DIE object. @@ -242,6 +253,8 @@ class Generator { std::vector<std::unique_ptr<LineTable>> LineTables; DIEAbbrevSet Abbreviations; + MCSymbol *StringOffsetsStartSym; + SmallString<4096> FileBytes; /// The stream we use to generate the DWARF into as an ELF file. std::unique_ptr<raw_svector_ostream> Stream; @@ -293,6 +306,7 @@ public: MCContext *getMCContext() const { return MC.get(); } DIEAbbrevSet &getAbbrevSet() { return Abbreviations; } DwarfStringPool &getStringPool() { return *StringPool; } + MCSymbol *getStringOffsetsStartSym() const { return StringOffsetsStartSym; } /// Save the generated DWARF file to disk. /// |

