diff options
author | Alexey Samsonov <samsonov@google.com> | 2013-04-08 14:37:16 +0000 |
---|---|---|
committer | Alexey Samsonov <samsonov@google.com> | 2013-04-08 14:37:16 +0000 |
commit | d6b89ef0fa17cf77677358a797934fa061564f5b (patch) | |
tree | fbacfbddd01c1605411a6da1c61df35aa2b8ed72 /lib/DebugInfo/DWARFDebugInfoEntry.h | |
parent | 9d55c099d628d7835dd1b502cb29c96cae350099 (diff) |
DWARF parser: remove duplicated code and fix code style in DIE extractors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179023 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/DWARFDebugInfoEntry.h')
-rw-r--r-- | lib/DebugInfo/DWARFDebugInfoEntry.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/DebugInfo/DWARFDebugInfoEntry.h b/lib/DebugInfo/DWARFDebugInfoEntry.h index 9c1b2be0a7..9003591cbe 100644 --- a/lib/DebugInfo/DWARFDebugInfoEntry.h +++ b/lib/DebugInfo/DWARFDebugInfoEntry.h @@ -45,12 +45,17 @@ public: uint32_t *offset_ptr, uint16_t attr, uint16_t form, unsigned indent = 0) const; - bool extractFast(const DWARFCompileUnit *cu, const uint8_t *fixed_form_sizes, - uint32_t *offset_ptr); + /// Extracts a debug info entry, which is a child of a given compile unit, + /// starting at a given offset. If DIE can't be extracted, returns false and + /// doesn't change OffsetPtr. + bool extractFast(const DWARFCompileUnit *CU, const uint8_t *FixedFormSizes, + uint32_t *OffsetPtr); /// Extract a debug info entry for a given compile unit from the /// .debug_info and .debug_abbrev data starting at the given offset. - bool extract(const DWARFCompileUnit *cu, uint32_t *offset_ptr); + /// If compile unit can't be parsed, returns false and doesn't change + /// OffsetPtr. + bool extract(const DWARFCompileUnit *CU, uint32_t *OffsetPtr); uint32_t getTag() const { return AbbrevDecl ? AbbrevDecl->getTag() : 0; } bool isNULL() const { return AbbrevDecl == 0; } |