summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-01-12 18:48:36 +0000
committerDevang Patel <dpatel@apple.com>2009-01-12 18:48:36 +0000
commitf033d53264d746aaf8b6fdd8fbaebf54048c95ba (patch)
tree9d3fc0273c19cfbfa21e27ded0ced0190a9f1c90 /llvm/lib/CodeGen
parent45a33ecce1fc8888834d88c3b16f6d86b40ade78 (diff)
downloadbcm5719-llvm-f033d53264d746aaf8b6fdd8fbaebf54048c95ba.tar.gz
bcm5719-llvm-f033d53264d746aaf8b6fdd8fbaebf54048c95ba.zip
Clear debug info at the end of function processing.
llvm-svn: 62092
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
index 0194dd4e490..2e4f7c0bb3e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfWriter.cpp
@@ -1249,7 +1249,10 @@ public:
DbgScope(DbgScope *P, DIDescriptor *D)
: Parent(P), Desc(D), StartLabelID(0), EndLabelID(0), Scopes(), Variables()
{}
- ~DbgScope();
+ ~DbgScope() {
+ for (unsigned i = 0, N = Scopes.size(); i < N; ++i) delete Scopes[i];
+ for (unsigned j = 0, M = Variables.size(); j < M; ++j) delete Variables[j];
+ }
// Accessors.
DbgScope *getParent() const { return Parent; }
@@ -3821,6 +3824,14 @@ public:
DebugFrames.push_back(FunctionDebugFrameInfo(SubprogramCount,
MMI->getFrameMoves()));
+
+ // Clear debug info
+ if (RootDbgScope) {
+ delete RootDbgScope;
+ DbgScopeMap.clear();
+ RootDbgScope = NULL;
+ }
+ Lines.clear();
}
};
OpenPOWER on IntegriCloud