diff options
author | Devang Patel <dpatel@apple.com> | 2011-01-19 01:36:36 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-01-19 01:36:36 +0000 |
commit | bcbd03ac0ac0890a436e1a179d3a285e914d41fa (patch) | |
tree | d91817e21ec9ec52268e3468810bd97e0a5f4f6e /lib/CodeGen/CGObjC.cpp | |
parent | 0b53cf834346d78985aaa9e7300445a39c245614 (diff) |
Emit DW_TAG_lexical_scope to surround foreach.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@123802 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGObjC.cpp')
-rw-r--r-- | lib/CodeGen/CGObjC.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/CodeGen/CGObjC.cpp b/lib/CodeGen/CGObjC.cpp index c7f834acb6..0837c578a7 100644 --- a/lib/CodeGen/CGObjC.cpp +++ b/lib/CodeGen/CGObjC.cpp @@ -11,6 +11,7 @@ // //===----------------------------------------------------------------------===// +#include "CGDebugInfo.h" #include "CGObjCRuntime.h" #include "CodeGenFunction.h" #include "CodeGenModule.h" @@ -612,6 +613,12 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ return; } + CGDebugInfo *DI = getDebugInfo(); + if (DI) { + DI->setLocation(S.getSourceRange().getBegin()); + DI->EmitRegionStart(Builder); + } + JumpDest LoopEnd = getJumpDestInCurrentScope("forcoll.end"); JumpDest AfterBody = getJumpDestInCurrentScope("forcoll.next"); @@ -842,6 +849,11 @@ void CodeGenFunction::EmitObjCForCollectionStmt(const ObjCForCollectionStmt &S){ EmitStoreThroughLValue(RValue::get(null), elementLValue, elementType); } + if (DI) { + DI->setLocation(S.getSourceRange().getEnd()); + DI->EmitRegionEnd(Builder); + } + EmitBlock(LoopEnd.getBlock()); } |