aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorManman Ren <manman.ren@gmail.com>2013-10-22 20:59:19 +0000
committerManman Ren <manman.ren@gmail.com>2013-10-22 20:59:19 +0000
commitd56c9db9603c3e2edf43405142dee60559559919 (patch)
tree7610492864c1d2e265ed607b249df7332309848a /lib
parentdd620a9ff5c8340617f22decedcbecbd2f0a1582 (diff)
downloadexternal_llvm-d56c9db9603c3e2edf43405142dee60559559919.zip
external_llvm-d56c9db9603c3e2edf43405142dee60559559919.tar.gz
external_llvm-d56c9db9603c3e2edf43405142dee60559559919.tar.bz2
Debug Info: code clean up.
Remove unnecessary creation of LexicalScope in collectDeadVariables. The created LexicialScope was only used to get isAbstractScope, which should be false from the creation: "new LexicalScope(NULL, DIDescriptor(SP), NULL, false);". We can also remove a DenseMap that holds the created LexicalScopes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193196 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index daa06c2..906239d 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -969,7 +969,6 @@ void DwarfDebug::computeInlinedDIEs() {
// Collect info for variables that were optimized out.
void DwarfDebug::collectDeadVariables() {
const Module *M = MMI->getModule();
- DenseMap<const MDNode *, LexicalScope *> DeadFnScopeMap;
if (NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu")) {
for (unsigned i = 0, e = CU_Nodes->getNumOperands(); i != e; ++i) {
@@ -987,10 +986,6 @@ void DwarfDebug::collectDeadVariables() {
if (Variables.getNumElements() == 0)
continue;
- LexicalScope *Scope =
- new LexicalScope(NULL, DIDescriptor(SP), NULL, false);
- DeadFnScopeMap[SP] = Scope;
-
// Construct subprogram DIE and add variables DIEs.
CompileUnit *SPCU = CUMap.lookup(TheCU);
assert(SPCU && "Unable to find Compile Unit!");
@@ -1004,13 +999,12 @@ void DwarfDebug::collectDeadVariables() {
continue;
DbgVariable NewVar(DV, NULL, this);
if (DIE *VariableDIE =
- SPCU->constructVariableDIE(&NewVar, Scope->isAbstractScope()))
+ SPCU->constructVariableDIE(&NewVar, false))
SPDIE->addChild(VariableDIE);
}
}
}
}
- DeleteContainerSeconds(DeadFnScopeMap);
}
// Type Signature [7.27] and ODR Hash code.