diff options
author | Eric Christopher <echristo@apple.com> | 2011-10-13 21:43:44 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-10-13 21:43:44 +0000 |
commit | fe28ef41e34e842e6b77d9aa4bdf2bc2d6f17cae (patch) | |
tree | f8837acc0190eeff232638385f1ff6620ab33b7f /lib/CodeGen/LexicalScopes.cpp | |
parent | a4d326dcefea972e350c1772cda41214240740fd (diff) |
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
Diffstat (limited to 'lib/CodeGen/LexicalScopes.cpp')
-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) |