[PATCH] Fix line numbers for code inlined from __nodebug__ functions.

Evgeniy Stepanov eugenis at google.com
Wed Jun 4 01:34:28 PDT 2014


================
Comment at: test/Transforms/Inline/inline-line-numbers.ll:9
@@ +8,3 @@
+;   clang -S test.c -emit-llvm -O1 -gline-tables-only -fno-strict-aliasing
+; and manually removing !dbg metadata from the first store instruction.
+
----------------
David Blaikie wrote:
> This seems a strange way to test this - I would've expected just a single assignment in "callee" and the nodebug attribute on it?
> 
> Why two assignments and a manual modification to the metadata?
Because this way I'm testing a function that has instructions both with and without debug metadata. This is not the exact case we are interested in, but a more general one.


================
Comment at: tools/clang/test/CodeGen/sse-builtins.c:9
@@ -8,3 +8,3 @@
   // CHECK: define {{.*}} @test_rsqrt_ss
-  // CHECK: call <4 x float> @llvm.x86.sse.rsqrt.ss
+  // CHECK: call <4 x float> @llvm.x86.sse.rsqrt.ss{{.*}}, !dbg
   // CHECK: extractelement <4 x float> {{.*}}, i32 0
----------------
David Blaikie wrote:
> Does this need to be tested here (and for /every/ intrinsic)? Seems fair to just test this once. (I guess somewhere we test that the intrinsics have nodebug on them in some way already?)
Sounds reasonable, I'll add a separate test for this.

http://reviews.llvm.org/D3988






More information about the llvm-commits mailing list