[llvm-commits] [llvm] r141892 - /llvm/trunk/lib/CodeGen/LexicalScopes.cpp
Eric Christopher
echristo at apple.com
Thu Oct 13 14:43:44 PDT 2011
Author: echristo
Date: Thu Oct 13 16:43:44 2011
New Revision: 141892
URL: http://llvm.org/viewvc/llvm-project?rev=141892&view=rev
Log:
Don't forget to reconstruct D after changing the scope that we're
looking at.
Modified:
llvm/trunk/lib/CodeGen/LexicalScopes.cpp
Modified: llvm/trunk/lib/CodeGen/LexicalScopes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/LexicalScopes.cpp?rev=141892&r1=141891&r2=141892&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/LexicalScopes.cpp (original)
+++ llvm/trunk/lib/CodeGen/LexicalScopes.cpp Thu Oct 13 16:43:44 2011
@@ -150,8 +150,10 @@
/// 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)
More information about the llvm-commits
mailing list