summaryrefslogtreecommitdiff
path: root/test/esan
diff options
context:
space:
mode:
authorQin Zhao <zhaoqin@google.com>2016-07-07 03:20:24 +0000
committerQin Zhao <zhaoqin@google.com>2016-07-07 03:20:24 +0000
commit4f47f51e687aaf4ea749e0cc72e4a1dc60e4ae95 (patch)
tree859a1b5bfc9c6d2e50513931ba13c7716aa53445 /test/esan
parent3df39427e495cb2ae84b9d7fc8541d4601f7b597 (diff)
[esan|cfrag] Handle binaries built with -esan-aux-field-info=false
Summary: Handles binaries built with -esan-aux-field-info=false and print less information. Updates test struct-simple.cpp. Reviewers: aizatsky Subscribers: llvm-commits, bruening, eugenis, kcc, zhaoqin, kubabrecka, vitalybuka Differential Revision: http://reviews.llvm.org/D22020 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@274727 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/esan')
-rw-r--r--test/esan/TestCases/struct-simple.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/test/esan/TestCases/struct-simple.cpp b/test/esan/TestCases/struct-simple.cpp
index a6b0a2f0b..c52154e09 100644
--- a/test/esan/TestCases/struct-simple.cpp
+++ b/test/esan/TestCases/struct-simple.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_esan_frag -O0 %s -DPART1 -c -o %t-part1.o 2>&1
+// RUN: %clang_esan_frag -O0 %s -DPART1 -mllvm -esan-aux-field-info=0 -c -o %t-part1.o 2>&1
// RUN: %clang_esan_frag -O0 %s -DPART2 -c -o %t-part2.o 2>&1
// RUN: %clang_esan_frag -O0 %s -DMAIN -c -o %t-main.o 2>&1
// RUN: %clang_esan_frag -O0 %t-part1.o %t-part2.o %t-main.o -o %t 2>&1
@@ -163,8 +163,8 @@ int main(int argc, char **argv) {
// CHECK-NEXT: Unregister struct.S#2#11#11: 2 fields
// CHECK-NEXT: {{.*}} struct S
// CHECK-NEXT: {{.*}} size = 8, count = 2, ratio = 2, array access = 0
- // CHECK-NEXT: {{.*}} # 0: offset = 0, size = 4, count = 2, type = i32
- // CHECK-NEXT: {{.*}} # 1: offset = 4, size = 4, count = 0, type = i32
+ // CHECK-NEXT: {{.*}} # 0: count = 2
+ // CHECK-NEXT: {{.*}} # 1: count = 0
// CHECK-NEXT: Unregister struct.D#3#11#11#11: 3 fields
// CHECK-NEXT: {{.*}} struct D
// CHECK-NEXT: {{.*}} size = 12, count = 2, ratio = 2, array access = 0
@@ -178,27 +178,27 @@ int main(int argc, char **argv) {
// CHECK-NEXT: Unregister struct.A#2#11#11: 2 fields
// CHECK-NEXT: {{.*}} struct A
// CHECK-NEXT: {{.*}} size = 8, count = 2049, ratio = 2048, array access = 0
- // CHECK-NEXT: {{.*}} # 0: offset = 0, size = 4, count = 2048, type = i32
- // CHECK-NEXT: {{.*}} # 1: offset = 4, size = 4, count = 1, type = i32
+ // CHECK-NEXT: {{.*}} # 0: count = 2048
+ // CHECK-NEXT: {{.*}} # 1: count = 1
// CHECK-NEXT: Unregister struct.B#2#3#2: 2 fields
// CHECK-NEXT: {{.*}} struct B
// CHECK-NEXT: {{.*}} size = 16, count = 2097153, ratio = 2097152, array access = 0
- // CHECK-NEXT: {{.*}} # 0: offset = 0, size = 4, count = 1, type = float
- // CHECK-NEXT: {{.*}} # 1: offset = 8, size = 8, count = 2097152, type = double
+ // CHECK-NEXT: {{.*}} # 0: count = 1
+ // CHECK-NEXT: {{.*}} # 1: count = 2097152
// CHECK-NEXT: Unregister union.U#1#3: 1 fields
// CHECK-NEXT: Duplicated struct.S#2#11#11: 2 fields
// CHECK-NEXT: Unregister struct.D#3#14#11#11: 3 fields
// CHECK-NEXT: {{.*}} struct D
// CHECK-NEXT: {{.*}} size = 128, count = 2097153, ratio = 2097153, array access = 0
- // CHECK-NEXT: {{.*}} # 0: offset = 0, size = 4, count = 1, type = i32
- // CHECK-NEXT: {{.*}} # 1: offset = 4, size = 4, count = 0, type = i32
- // CHECK-NEXT: {{.*}} # 2: offset = 8, size = 120, count = 2097152, type = [10 x %struct.anon]
+ // CHECK-NEXT: {{.*}} # 0: count = 1
+ // CHECK-NEXT: {{.*}} # 1: count = 0
+ // CHECK-NEXT: {{.*}} # 2: count = 2097152
// CHECK-NEXT: Unregister struct.anon#3#11#11#11: 3 fields
// CHECK-NEXT: {{.*}} struct anon
// CHECK-NEXT: {{.*}} size = 12, count = 2097152, ratio = 4194304, array access = 2097152
- // CHECK-NEXT: {{.*}} # 0: offset = 0, size = 4, count = 0, type = i32
- // CHECK-NEXT: {{.*}} # 1: offset = 4, size = 4, count = 2097152, type = i32
- // CHECK-NEXT: {{.*}} # 2: offset = 8, size = 4, count = 0, type = i32
+ // CHECK-NEXT: {{.*}} # 0: count = 0
+ // CHECK-NEXT: {{.*}} # 1: count = 2097152
+ // CHECK-NEXT: {{.*}} # 2: count = 0
// CHECK-NEXT: {{.*}}EfficiencySanitizer: total struct field access count = 6293518
}
#endif // MAIN