vsk added inline comments.

================
Comment at: lib/CodeGen/CGDecl.cpp:2074
+  if (DoStore) {
+   auto DL = ApplyDebugLocation::CreateArtificial(*this);
+   EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
----------------
Ideally this would precede the calls to CreateMemTemp which set up the allocas.


================
Comment at: test/CodeGen/debug-info-preserve-scope.c:10
+
+// CHECK: store i32 %b, i32* %b.addr, align 4, !dbg ![[dbgLocForStore:[0-9]+]]
+
----------------
Can you check that the alloca gets the same location as well? You can do this 
with:
```
CHECK: alloca {{.*}} !dbg ![[dbgLocForStore:[0-9]+]]
CHECK: store i32 {{.*}} !dbg ![[dbgLocForStore]]
```


Repository:
  rC Clang

https://reviews.llvm.org/D47097



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to