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 | d2d6665c71ca6f8f8fc286870610c0985dbbf650 (patch) | |
tree | e3025ca56c0a3e7d34ab2658e6deb7e348ea65be /clang/lib/CodeGen | |
parent | 771ec8006cedf9be93a1ff9475577e1d4bc663b0 (diff) | |
download | bcm5719-llvm-d2d6665c71ca6f8f8fc286870610c0985dbbf650.tar.gz bcm5719-llvm-d2d6665c71ca6f8f8fc286870610c0985dbbf650.zip |
Emit DW_TAG_lexical_scope to surround foreach.
llvm-svn: 123802
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGObjC.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp index c7f834acb6f..0837c578a79 100644 --- a/clang/lib/CodeGen/CGObjC.cpp +++ b/clang/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()); } |