Emit DW_TAG_lexical_scope to surround foreach.

llvm-svn: 123802
diff --git a/clang/lib/CodeGen/CGObjC.cpp b/clang/lib/CodeGen/CGObjC.cpp
index c7f834a..0837c57 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 @@
     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 @@
     EmitStoreThroughLValue(RValue::get(null), elementLValue, elementType);
   }
 
+  if (DI) {
+    DI->setLocation(S.getSourceRange().getEnd());
+    DI->EmitRegionEnd(Builder);
+  }
+
   EmitBlock(LoopEnd.getBlock());
 }