summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LexicalScopes.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-10-13 21:43:44 +0000
committerEric Christopher <echristo@apple.com>2011-10-13 21:43:44 +0000
commit76933f4c0b11f8920eebdbcdc2db2abd84bcea8d (patch)
tree8b99b9c747b9a3ba50c6f2c1197e8af46d09a7a6 /llvm/lib/CodeGen/LexicalScopes.cpp
parent60f0263596d3308f300da9999fcbd3d849fac92f (diff)
downloadbcm5719-llvm-76933f4c0b11f8920eebdbcdc2db2abd84bcea8d.tar.gz
bcm5719-llvm-76933f4c0b11f8920eebdbcdc2db2abd84bcea8d.zip
Don't forget to reconstruct D after changing the scope that we're
looking at. llvm-svn: 141892
Diffstat (limited to 'llvm/lib/CodeGen/LexicalScopes.cpp')
-rw-r--r--llvm/lib/CodeGen/LexicalScopes.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LexicalScopes.cpp b/llvm/lib/CodeGen/LexicalScopes.cpp
index 02fa52527dd..a12e1a36d11 100644
--- a/llvm/lib/CodeGen/LexicalScopes.cpp
+++ b/llvm/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)
OpenPOWER on IntegriCloud