summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2010-04-08 15:37:09 +0000
committerDevang Patel <dpatel@apple.com>2010-04-08 15:37:09 +0000
commitf1d5a1e994cdd08c2334c6671ae4e67e8e62e573 (patch)
tree534540bce105cef8d2f2d91e44945e44b14236ba /llvm/lib/CodeGen/AsmPrinter
parent53dd088b5865963ac956a31b1dcdb68daab343df (diff)
downloadbcm5719-llvm-f1d5a1e994cdd08c2334c6671ae4e67e8e62e573.tar.gz
bcm5719-llvm-f1d5a1e994cdd08c2334c6671ae4e67e8e62e573.zip
Refactor.
llvm-svn: 100768
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp12
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h5
2 files changed, 15 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 259167b809b..b1e190c3f51 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 006ee2d7558..6d725646054 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -527,6 +527,11 @@ private:
return Lines.size();
}
+ /// populateDbgScopeInverseMaps() - Populate DbgScopeBeginMap and
+ /// DbgScopeEndMap. This maps are used to indentify debug scope started
+ /// and ended by an instruction.
+ void populateDbgScopeInverseMaps();
+
/// extractScopeInformation - Scan machine instructions in this function
/// and collect DbgScopes. Return true, if atleast one scope was found.
bool extractScopeInformation();
OpenPOWER on IntegriCloud