aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-07-15 16:38:42 +0000
committerDevang Patel <dpatel@apple.com>2011-07-15 16:38:42 +0000
commit1e479fb5c1937e586cb485f1d6a1f09e5f08c957 (patch)
treea635fec6da88e486d03014a2341de3423fe4a092
parent20722b6cda6a8857a00e84133c8d8516400aca4d (diff)
downloadexternal_llvm-1e479fb5c1937e586cb485f1d6a1f09e5f08c957.zip
external_llvm-1e479fb5c1937e586cb485f1d6a1f09e5f08c957.tar.gz
external_llvm-1e479fb5c1937e586cb485f1d6a1f09e5f08c957.tar.bz2
Eliminate redundant map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135278 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.cpp11
-rw-r--r--lib/CodeGen/AsmPrinter/DwarfDebug.h4
2 files changed, 3 insertions, 12 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 03fb8d1..c5efd99 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -1597,9 +1597,6 @@ DbgScope *DwarfDebug::getOrCreateDbgScope(DebugLoc DL) {
getOrCreateDbgScope(DebugLoc::getFromDILocation(InlinedAt));
WScope->setParent(Parent);
Parent->addScope(WScope);
-
- ConcreteScopes[InlinedAt] = WScope;
-
return WScope;
}
@@ -2049,7 +2046,6 @@ void DwarfDebug::endFunction(const MachineFunction *MF) {
DeleteContainerSeconds(DbgScopeMap);
UserVariables.clear();
DbgValues.clear();
- ConcreteScopes.clear();
DeleteContainerSeconds(AbstractScopes);
AbstractScopesList.clear();
AbstractVariables.clear();
@@ -2083,11 +2079,10 @@ DbgScope *DwarfDebug::findDbgScope(DebugLoc DL) {
DbgScope *Scope = NULL;
LLVMContext &Ctx = Asm->MF->getFunction()->getContext();
+ const MDNode *N = DL.getScope(Ctx);
if (const MDNode *IA = DL.getInlinedAt(Ctx))
- Scope = ConcreteScopes.lookup(IA);
- if (Scope == 0)
- Scope = DbgScopeMap.lookup(DL.getScope(Ctx));
-
+ N = IA;
+ Scope = DbgScopeMap.lookup(N);
return Scope;
}
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 652ea7f..82b319f 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -204,10 +204,6 @@ class DwarfDebug {
///
DenseMap<const MDNode *, DbgScope *> DbgScopeMap;
- /// ConcreteScopes - Tracks the concrete scopees in the current function.
- /// These scopes are also included in DbgScopeMap.
- DenseMap<const MDNode *, DbgScope *> ConcreteScopes;
-
/// AbstractScopes - Tracks the abstract scopes a module. These scopes are
/// not included DbgScopeMap. AbstractScopes owns its DbgScope*s.
DenseMap<const MDNode *, DbgScope *> AbstractScopes;