diff options
Diffstat (limited to 'lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 259167b809..b1e190c3f5 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2268,6 +2268,16 @@ bool DwarfDebug::extractScopeInformation() { CurrentFnDbgScope->fixInstructionMarkers(MIIndexMap); + populateDbgScopeInverseMaps(); + + return !DbgScopeMap.empty(); +} + +/// populateDbgScopeInverseMaps() - Populate DbgScopeBeginMap and +/// DbgScopeEndMap. This maps are used to indentify debug scope started +/// and ended by an instruction. +void DwarfDebug::populateDbgScopeInverseMaps() { + // Each scope has first instruction and last instruction to mark beginning // and end of a scope respectively. Create an inverse map that list scopes // starts (and ends) with an instruction. One instruction may start (or end) @@ -2302,8 +2312,6 @@ bool DwarfDebug::extractScopeInformation() { else DbgScopeEndMap[MI].push_back(S); } - - return !DbgScopeMap.empty(); } /// beginFunction - Gather pre-function debug information. Assumes being |