summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2014-05-25 18:11:35 +0000
committerDavid Blaikie <dblaikie@gmail.com>2014-05-25 18:11:35 +0000
commitea86226774caf12b038d2e8b24b10da754316fe8 (patch)
treea340e7c0d49873ebcb732d7dc2a3113500e929c9 /llvm/lib/CodeGen
parent69d3406a2d5832effb999c4bd297a36d4e81e6a7 (diff)
downloadbcm5719-llvm-ea86226774caf12b038d2e8b24b10da754316fe8.tar.gz
bcm5719-llvm-ea86226774caf12b038d2e8b24b10da754316fe8.zip
DebugInfo: Fix inlining with #file directives a little harder
Seems my previous fix was insufficient - we were still not adding the inlined function to the abstract scope list. Which meant it wasn't flagged as inline, didn't have nested lexical scopes in the abstract definition, and didn't have abstract variables - so the inlined variable didn't reference an abstract variable, instead being described completely inline. llvm-svn: 209602
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LexicalScopes.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp
index d965968fb49..d12c234bf3b 100644
--- a/llvm/lib/CodeGen/LexicalScopes.cpp
+++ b/llvm/lib/CodeGen/LexicalScopes.cpp
@@ -210,21 +210,21 @@ LexicalScope *LexicalScopes::getOrCreateAbstractScope(const MDNode *N) {
DIDescriptor Scope(N);
if (Scope.isLexicalBlockFile())
Scope = DILexicalBlockFile(Scope).getScope();
- auto I = AbstractScopeMap.find(N);
+ auto I = AbstractScopeMap.find(Scope);
if (I != AbstractScopeMap.end())
return &I->second;
LexicalScope *Parent = nullptr;
if (Scope.isLexicalBlock()) {
- DILexicalBlock DB(N);
+ DILexicalBlock DB(Scope);
DIDescriptor ParentDesc = DB.getContext();
Parent = getOrCreateAbstractScope(ParentDesc);
}
I = AbstractScopeMap.emplace(std::piecewise_construct,
- std::forward_as_tuple(N),
- std::forward_as_tuple(Parent, DIDescriptor(N),
+ std::forward_as_tuple(Scope),
+ std::forward_as_tuple(Parent, Scope,
nullptr, true)).first;
- if (DIDescriptor(N).isSubprogram())
+ if (Scope.isSubprogram())
AbstractScopesList.push_back(&I->second);
return &I->second;
}
OpenPOWER on IntegriCloud