diff options
-rw-r--r-- | lib/CodeGen/LexicalScopes.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LexicalScopes.cpp b/lib/CodeGen/LexicalScopes.cpp index 02fa52527d..a12e1a36d1 100644 --- a/lib/CodeGen/LexicalScopes.cpp +++ b/lib/CodeGen/LexicalScopes.cpp @@ -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) |