diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-01-27 22:28:56 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2016-01-27 22:28:56 +0000 |
commit | 13652c55fc407871cdf1d5d1bc442e51f3fd5534 (patch) | |
tree | 0efb841bfe685315cc4155d29f05c440cf5446a8 /test/CodeGen | |
parent | 3df2d70e2453b1a8b9f8267e64bb4cee5821579d (diff) | |
download | clang-13652c55fc407871cdf1d5d1bc442e51f3fd5534.tar.gz |
Strengthen cfi-check-fail test.
r258993 allows stricter testing for basic block labels by making
sure that they are always followed by ":". Use this to improve the
test.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258997 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/cfi-check-fail.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/test/CodeGen/cfi-check-fail.c b/test/CodeGen/cfi-check-fail.c index fbeb89e513..9e0a64902c 100644 --- a/test/CodeGen/cfi-check-fail.c +++ b/test/CodeGen/cfi-check-fail.c @@ -14,58 +14,58 @@ void caller(void (*f)()) { // CHECK: %[[ICMP_NOT_NULL:.*]] = icmp ne i8* %[[DATA]], null // CHECK: br i1 %[[ICMP_NOT_NULL]], label %[[CONT0:.*]], label %[[TRAP:.*]], -// CHECK: [[TRAP]] +// CHECK: [[TRAP]]: // CHECK-NEXT: call void @llvm.trap() // CHECK-NEXT: unreachable -// CHECK: [[CONT0]] +// CHECK: [[CONT0]]: // CHECK: %[[A:.*]] = bitcast i8* %[[DATA]] to { i8, { i8*, i32, i32 }, i8* }* // CHECK: %[[KINDPTR:.*]] = getelementptr {{.*}} %[[A]], i32 0, i32 0 // CHECK: %[[KIND:.*]] = load i8, i8* %[[KINDPTR]], align 4 // CHECK: %[[NOT_0:.*]] = icmp ne i8 %[[KIND]], 0 // CHECK: br i1 %[[NOT_0]], label %[[CONT1:.*]], label %[[HANDLE0:.*]], !prof -// CHECK: [[HANDLE0]] +// CHECK: [[HANDLE0]]: // CHECK: %[[DATA0:.*]] = ptrtoint i8* %[[DATA]] to i64, // CHECK: %[[ADDR0:.*]] = ptrtoint i8* %[[ADDR]] to i64, // CHECK: call void @__ubsan_handle_cfi_check_fail(i64 %[[DATA0]], i64 %[[ADDR0]]) // CHECK: br label %[[CONT1]] -// CHECK: [[CONT1]] +// CHECK: [[CONT1]]: // CHECK: %[[NOT_1:.*]] = icmp ne i8 %[[KIND]], 1 // CHECK: br i1 %[[NOT_1]], label %[[CONT2:.*]], label %[[HANDLE1:.*]], !nosanitize -// CHECK: [[HANDLE1]] +// CHECK: [[HANDLE1]]: // CHECK-NEXT: call void @llvm.trap() // CHECK-NEXT: unreachable -// CHECK: [[CONT2]] +// CHECK: [[CONT2]]: // CHECK: %[[NOT_2:.*]] = icmp ne i8 %[[KIND]], 2 // CHECK: br i1 %[[NOT_2]], label %[[CONT3:.*]], label %[[HANDLE2:.*]], !prof -// CHECK: [[HANDLE2]] +// CHECK: [[HANDLE2]]: // CHECK: %[[DATA2:.*]] = ptrtoint i8* %[[DATA]] to i64, // CHECK: %[[ADDR2:.*]] = ptrtoint i8* %[[ADDR]] to i64, // CHECK: call void @__ubsan_handle_cfi_check_fail_abort(i64 %[[DATA2]], i64 %[[ADDR2]]) // CHECK: unreachable -// CHECK: [[CONT3]] +// CHECK: [[CONT3]]: // CHECK: %[[NOT_3:.*]] = icmp ne i8 %[[KIND]], 3 // CHECK: br i1 %[[NOT_3]], label %[[CONT4:.*]], label %[[HANDLE3:.*]], !prof -// CHECK: [[HANDLE3]] +// CHECK: [[HANDLE3]]: // CHECK: %[[DATA3:.*]] = ptrtoint i8* %[[DATA]] to i64, // CHECK: %[[ADDR3:.*]] = ptrtoint i8* %[[ADDR]] to i64, // CHECK: call void @__ubsan_handle_cfi_check_fail(i64 %[[DATA3]], i64 %[[ADDR3]]) // CHECK: br label %[[CONT4]] -// CHECK: [[CONT4]] +// CHECK: [[CONT4]]: // CHECK: %[[NOT_4:.*]] = icmp ne i8 %[[KIND]], 4 // CHECK: br i1 %[[NOT_4]], label %[[CONT5:.*]], label %[[HANDLE4:.*]], !nosanitize -// CHECK: [[HANDLE4]] +// CHECK: [[HANDLE4]]: // CHECK-NEXT: call void @llvm.trap() // CHECK-NEXT: unreachable -// CHECK: [[CONT5]] +// CHECK: [[CONT5]]: // CHECK: ret void |