aboutsummaryrefslogtreecommitdiffstats
path: root/lib/DebugInfo/DWARFCompileUnit.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/DebugInfo/DWARFCompileUnit.h')
-rw-r--r--lib/DebugInfo/DWARFCompileUnit.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/DebugInfo/DWARFCompileUnit.h b/lib/DebugInfo/DWARFCompileUnit.h
index 378b6ced8c..d9167292a9 100644
--- a/lib/DebugInfo/DWARFCompileUnit.h
+++ b/lib/DebugInfo/DWARFCompileUnit.h
@@ -70,6 +70,14 @@ public:
BaseAddr = base_addr;
}
+ const DWARFDebugInfoEntryMinimal *
+ getCompileUnitDIE(bool extract_cu_die_only = true) {
+ extractDIEsIfNeeded(extract_cu_die_only);
+ if (DieArray.empty())
+ return NULL;
+ return &DieArray[0];
+ }
+
/// setDIERelations - We read in all of the DIE entries into our flat list
/// of DIE entries and now we need to go back through all of them and set the
/// parent, sibling and child pointers for quick DIE navigation.