summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit642a0acce22b6e53da0b6dc1d2c6dd8009fb4ca3 (patch)
treef2277063a00bd607369d19ab69fbade644f9aca6 /llvm
parent9a02765bc3f4327d5fd9933f24c08caae48ff6b0 (diff)
downloadbcm5719-llvm-642a0acce22b6e53da0b6dc1d2c6dd8009fb4ca3.tar.gz
bcm5719-llvm-642a0acce22b6e53da0b6dc1d2c6dd8009fb4ca3.zip
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. llvm-svn: 193196
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index daa06c2c64e..906239d7097 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud