diff options
author | Devang Patel <dpatel@apple.com> | 2009-01-12 18:48:36 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-01-12 18:48:36 +0000 |
commit | a416295a223c1b4d84646fec2751da32a4bf6428 (patch) | |
tree | 81a3a7b5ed04ba000354644df4ec1eea4728ac90 | |
parent | b92249232c7e9033efbb3cef5c122f57c61d5751 (diff) | |
download | external_llvm-a416295a223c1b4d84646fec2751da32a4bf6428.zip external_llvm-a416295a223c1b4d84646fec2751da32a4bf6428.tar.gz external_llvm-a416295a223c1b4d84646fec2751da32a4bf6428.tar.bz2 |
Clear debug info at the end of function processing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@62092 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfWriter.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp b/lib/CodeGen/AsmPrinter/DwarfWriter.cpp index 0194dd4..2e4f7c0 100644 --- a/lib/CodeGen/AsmPrinter/DwarfWriter.cpp +++ b/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(); } }; |