diff options
author | Eric Christopher <echristo@apple.com> | 2011-10-12 18:39:35 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-10-12 18:39:35 +0000 |
commit | 28e06354b5d4dd539be6781e388ff27c0dffd807 (patch) | |
tree | 6e224a320ad39dcab3b12a05e16bd4a6c97d162e /lib/CodeGen/CGObjC.cpp | |
parent | d596c4d3f8931f4d479e965bf46d0e7edad85570 (diff) |
Revert file/scope handling patches. gdb testing revealed a couple of bugs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141796 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index 51f20534d1..344c1ee180 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -1208,8 +1208,10 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ } CGDebugInfo *DI = getDebugInfo(); - if (DI) - DI->EmitLexicalBlockStart(Builder, S.getSourceRange().getBegin()); + if (DI) { + DI->setLocation(S.getSourceRange().getBegin()); + DI->EmitLexicalBlockStart(Builder); + } // The local variable comes into scope immediately. AutoVarEmission variable = AutoVarEmission::invalid(); @@ -1463,8 +1465,10 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ EmitStoreThroughLValue(RValue::get(null), elementLValue); } - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getSourceRange().getEnd()); + if (DI) { + DI->setLocation(S.getSourceRange().getEnd()); + DI->EmitLexicalBlockEnd(Builder); + } // Leave the cleanup we entered in ARC. if (getLangOptions().ObjCAutoRefCount) @@ -2500,8 +2504,10 @@ void CodeGenFunction::EmitObjCAutoreleasePoolStmt( const CompoundStmt &S = cast<CompoundStmt>(*subStmt); CGDebugInfo *DI = getDebugInfo(); - if (DI) - DI->EmitLexicalBlockStart(Builder, S.getLBracLoc()); + if (DI) { + DI->setLocation(S.getLBracLoc()); + DI->EmitLexicalBlockStart(Builder); + } // Keep track of the current cleanup stack depth. RunCleanupsScope Scope(*this); @@ -2517,8 +2523,10 @@ void CodeGenFunction::EmitObjCAutoreleasePoolStmt( E = S.body_end(); I != E; ++I) EmitStmt(*I); - if (DI) - DI->EmitLexicalBlockEnd(Builder, S.getRBracLoc()); + if (DI) { + DI->setLocation(S.getRBracLoc()); + DI->EmitLexicalBlockEnd(Builder); + } } /// EmitExtendGCLifetime - Given a pointer to an Objective-C object, |