Don't forget to reconstruct D after changing the scope that we're

looking at.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher 2011-10-13 21:43:44 +00:00
parent a4d326dcef
commit fe28ef41e3

View File

@ -150,8 +150,10 @@ LexicalScope *LexicalScopes::getOrCreateLexicalScope(DebugLoc DL) {
/// getOrCreateRegularScope - Find or create a regular lexical scope.
LexicalScope *LexicalScopes::getOrCreateRegularScope(MDNode *Scope) {
DIDescriptor D = DIDescriptor(Scope);
if (D.isLexicalBlockFile())
if (D.isLexicalBlockFile()) {
Scope = DILexicalBlockFile(Scope).getScope();
D = DIDescriptor(Scope);
}
LexicalScope *WScope = LexicalScopeMap.lookup(Scope);
if (WScope)