[PATCH] D47161: update

2018-05-23 Thread Anastasis via Phabricator via cfe-commits
gramanas added a comment.

It was a mistake on my part with the arcanist tool. The documentation is fine, 
the only problems I encountered were due to my ignorance of how these systems 
work.


Repository:
  rC Clang

https://reviews.llvm.org/D47161



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


[PATCH] D47161: update

2018-05-22 Thread Paul Robinson via Phabricator via cfe-commits
probinson added a comment.

I take it this was accidental?  If there are weaknesses in our documentation 
for how to use Phabricator, please let us know.  I know it is not always 
straightforward (I had a number of issues when I tried to start using it).


Repository:
  rC Clang

https://reviews.llvm.org/D47161



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


[PATCH] D47161: update

2018-05-22 Thread Anastasis via Phabricator via cfe-commits
gramanas abandoned this revision.
gramanas added a comment.

Duplicate of https://reviews.llvm.org/D47097


Repository:
  rC Clang

https://reviews.llvm.org/D47161



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


[PATCH] D47161: update

2018-05-21 Thread Anastasis via Phabricator via cfe-commits
gramanas created this revision.
Herald added a subscriber: cfe-commits.

Repository:
  rC Clang

https://reviews.llvm.org/D47161

Files:
  lib/CodeGen/CGDecl.cpp
  test/CodeGen/debug-info-preserve-scope.c


Index: test/CodeGen/debug-info-preserve-scope.c
===
--- /dev/null
+++ test/CodeGen/debug-info-preserve-scope.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
+
+static int a;
+
+// CHECK-LABEL: define void @f
+void f(int b) {
+  a = b;
+}
+
+// CHECK: store i32 %b, i32* %b.addr, align 4, !dbg ![[dbgLocForStore:[0-9]+]]
+
+// CHECK: ![[dbgLocForStore]] = !DILocation(line: 0
Index: lib/CodeGen/CGDecl.cpp
===
--- lib/CodeGen/CGDecl.cpp
+++ lib/CodeGen/CGDecl.cpp
@@ -2070,8 +2070,10 @@
   }
 
   // Store the initial value into the alloca.
-  if (DoStore)
-EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
+  if (DoStore) {
+   auto DL = ApplyDebugLocation::CreateArtificial(*this);
+   EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
+  }
 
   setAddrOfLocalVar(, DeclPtr);
 


Index: test/CodeGen/debug-info-preserve-scope.c
===
--- /dev/null
+++ test/CodeGen/debug-info-preserve-scope.c
@@ -0,0 +1,12 @@
+// RUN: %clang_cc1 -debug-info-kind=limited -emit-llvm -o - %s | FileCheck %s
+
+static int a;
+
+// CHECK-LABEL: define void @f
+void f(int b) {
+  a = b;
+}
+
+// CHECK: store i32 %b, i32* %b.addr, align 4, !dbg ![[dbgLocForStore:[0-9]+]]
+
+// CHECK: ![[dbgLocForStore]] = !DILocation(line: 0
Index: lib/CodeGen/CGDecl.cpp
===
--- lib/CodeGen/CGDecl.cpp
+++ lib/CodeGen/CGDecl.cpp
@@ -2070,8 +2070,10 @@
   }
 
   // Store the initial value into the alloca.
-  if (DoStore)
-EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
+  if (DoStore) {
+   auto DL = ApplyDebugLocation::CreateArtificial(*this);
+   EmitStoreOfScalar(ArgVal, lv, /* isInitialization */ true);
+  }
 
   setAddrOfLocalVar(, DeclPtr);
 
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits