diff options
author | David Blaikie <dblaikie@gmail.com> | 2014-12-09 21:10:43 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2014-12-09 21:10:43 +0000 |
commit | 8ec8dfecd1fd8feb75c340e7e1675224ae18f669 (patch) | |
tree | f7982ead4e04c1330b27dd27a871e79e3fd5da6b /clang/test/CodeGenCXX/debug-info-line.cpp | |
parent | 0bfe828f7afb23d994317845d73c3eb4203acff8 (diff) | |
download | bcm5719-llvm-8ec8dfecd1fd8feb75c340e7e1675224ae18f669.tar.gz bcm5719-llvm-8ec8dfecd1fd8feb75c340e7e1675224ae18f669.zip |
DebugInfo: Accurate location information for complex assignment
llvm-svn: 223828
Diffstat (limited to 'clang/test/CodeGenCXX/debug-info-line.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/debug-info-line.cpp | 39 |
1 files changed, 23 insertions, 16 deletions
diff --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp index 8f4e080bdc0..c8e98cbc67f 100644 --- a/clang/test/CodeGenCXX/debug-info-line.cpp +++ b/clang/test/CodeGenCXX/debug-info-line.cpp @@ -1,14 +1,16 @@ // RUN: %clang_cc1 -g -std=c++11 -S -emit-llvm %s -o - | FileCheck %s int &src(); -int* sink(); +int *sink(); __complex float complex_src(); +__complex float *complex_sink(); +// CHECK-LABEL: define void f1() { #line 100 * // The store for the assignment should be attributed to the start of the - // assignment expression here, regardless of the location of subexpressions. - sink() = src(); + // assignment expression here, regardless of the location of subexpressions. + sink() = src(); // CHECK: store {{.*}}, !dbg [[DBG_F1:!.*]] } @@ -19,22 +21,27 @@ struct foo { foo(); }; +// CHECK-LABEL: define foo::foo() - : + : #line 200 - i - (src()), - // CHECK: store i32 {{.*}} !dbg [[DBG_FOO_VALUE:!.*]] - j - (src()), - // CHECK: store i32* {{.*}} !dbg [[DBG_FOO_REF:!.*]] - k - (complex_src()) - // CHECK: store float {{.*}} !dbg [[DBG_FOO_COMPLEX:!.*]] -{ + i // CHECK: store i32 {{.*}} !dbg [[DBG_FOO_VALUE:!.*]] + (src()), + j // CHECK: store i32* {{.*}} !dbg [[DBG_FOO_REF:!.*]] + (src()), + k // CHECK: store float {{.*}} !dbg [[DBG_FOO_COMPLEX:!.*]] + (complex_src()) { +} + +// CHECK-LABEL: define +void f2() { +#line 300 + * // CHECK: store float {{.*}} !dbg [[DBG_F2_COMPLEX:!.*]] + complex_sink() = complex_src(); } // CHECK: [[DBG_F1]] = metadata !{i32 100, // CHECK: [[DBG_FOO_VALUE]] = metadata !{i32 200, -// CHECK: [[DBG_FOO_REF]] = metadata !{i32 203, -// CHECK: [[DBG_FOO_COMPLEX]] = metadata !{i32 206, +// CHECK: [[DBG_FOO_REF]] = metadata !{i32 202, +// CHECK: [[DBG_FOO_COMPLEX]] = metadata !{i32 204, +// CHECK: [[DBG_F2_COMPLEX]] = metadata !{i32 300, |