From fe28ef41e34e842e6b77d9aa4bdf2bc2d6f17cae Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Thu, 13 Oct 2011 21:43:44 +0000 Subject: [PATCH] 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 --- lib/CodeGen/LexicalScopes.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/LexicalScopes.cpp b/lib/CodeGen/LexicalScopes.cpp index 02fa52527dd..a12e1a36d11 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) -- 2.34.1