diff options
| author | Fangrui Song <maskray@google.com> | 2020-01-08 15:44:35 -0800 |
|---|---|---|
| committer | Fangrui Song <maskray@google.com> | 2020-01-08 15:50:51 -0800 |
| commit | 7f1026a7520eb3d7e99da77f6738deb72de17980 (patch) | |
| tree | b2a1cec598f7555894548d6c8e259859a438e9bd /compiler-rt | |
| parent | f84d3200528a4aa1e8c7f2d3a9567f63f855b165 (diff) | |
| download | bcm5719-llvm-7f1026a7520eb3d7e99da77f6738deb72de17980.tar.gz bcm5719-llvm-7f1026a7520eb3d7e99da77f6738deb72de17980.zip | |
[cfi][test] cross-dso/stats.cpp: don't assume the order of static constructors
__sanitizer_stat_init is called for the executable first, then the
shared object. In WriterModuleReport(), the information for the shared
object will be recorded first. It'd be nice to get rid of the order
requirement of static constructors. (This should make .ctors platforms
work.)
Diffstat (limited to 'compiler-rt')
| -rw-r--r-- | compiler-rt/test/cfi/cross-dso/stats.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler-rt/test/cfi/cross-dso/stats.cpp b/compiler-rt/test/cfi/cross-dso/stats.cpp index 09a7217bf06..9d8c2ee3e0d 100644 --- a/compiler-rt/test/cfi/cross-dso/stats.cpp +++ b/compiler-rt/test/cfi/cross-dso/stats.cpp @@ -22,24 +22,24 @@ extern "C" void nvcall(A *a); #ifdef SHARED_LIB extern "C" __attribute__((noinline)) void vcall(A *a) { - // CHECK: stats.cpp:[[@LINE+1]] vcall.cfi cfi-vcall 37 + // CHECK-DAG: stats.cpp:[[@LINE+1]] vcall.cfi cfi-vcall 37 a->vf(); } extern "C" __attribute__((noinline)) void nvcall(A *a) { - // CHECK: stats.cpp:[[@LINE+1]] nvcall.cfi cfi-nvcall 51 + // CHECK-DAG: stats.cpp:[[@LINE+1]] nvcall.cfi cfi-nvcall 51 a->nvf(); } #else extern "C" __attribute__((noinline)) A *dcast(A *a) { - // CHECK: stats.cpp:[[@LINE+1]] dcast.cfi cfi-derived-cast 24 + // CHECK-DAG: stats.cpp:[[@LINE+1]] dcast.cfi cfi-derived-cast 24 return (A *)(ABase *)a; } extern "C" __attribute__((noinline)) A *ucast(A *a) { - // CHECK: stats.cpp:[[@LINE+1]] ucast.cfi cfi-unrelated-cast 81 + // CHECK-DAG: stats.cpp:[[@LINE+1]] ucast.cfi cfi-unrelated-cast 81 return (A *)(char *)a; } |

