r284639 - [ubsan] Re-work check lines to try to appease a bot (NFC)

Vedant Kumar via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 19 13:28:35 PDT 2016


Author: vedantk
Date: Wed Oct 19 15:28:35 2016
New Revision: 284639

URL: http://llvm.org/viewvc/llvm-project?rev=284639&view=rev
Log:
[ubsan] Re-work check lines to try to appease a bot (NFC)

This bot does not produce the IR I expect -- it's missing some
'handler.dynamic_type_cache_miss:' labels. We don't need to rely on
those labels, so get rid of them in hopes of making the bot happy.

    http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/55493

Modified:
    cfe/trunk/test/CodeGenCXX/ubsan-devirtualized-calls.cpp

Modified: cfe/trunk/test/CodeGenCXX/ubsan-devirtualized-calls.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/ubsan-devirtualized-calls.cpp?rev=284639&r1=284638&r2=284639&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/ubsan-devirtualized-calls.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/ubsan-devirtualized-calls.cpp Wed Oct 19 15:28:35 2016
@@ -39,53 +39,46 @@ struct Derived4 final : Base1 {
 void t1() {
   Derived1 d1;
   static_cast<Base1 *>(&d1)->f1(); //< Devirt Base1::f1 to Derived1::f1.
-  // CHECK: handler.dynamic_type_cache_miss:
-  // CHECK-NEXT: %[[D1:[0-9]+]] = ptrtoint %struct.Derived1* %d1 to i64, !nosanitize
-  // CHECK-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED1_1]] {{.*}}, i64 %[[D1]]
+  // CHECK: %[[D1:[0-9]+]] = ptrtoint %struct.Derived1* %d1 to i64, !nosanitize
+  // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED1_1]] {{.*}}, i64 %[[D1]]
 }
 
 // CHECK-LABEL: define void @_Z2t2v
 void t2() {
   Derived2 d2;
   static_cast<Base1 *>(&d2)->f1(); //< Devirt Base1::f1 to Derived2::f1.
-  // CHECK: handler.dynamic_type_cache_miss:
-  // CHECK-NEXT: %[[D2_1:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i64, !nosanitize
-  // CHECK-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED2_1]] {{.*}}, i64 %[[D2_1]]
+  // CHECK: %[[D2_1:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i64, !nosanitize
+  // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_1]] {{.*}}, i64 %[[D2_1]]
 }
 
 // CHECK-LABEL: define void @_Z2t3v
 void t3() {
   Derived2 d2;
   static_cast<Base2 *>(&d2)->f1(); //< Devirt Base2::f1 to Derived2::f1.
-  // CHECK: handler.dynamic_type_cache_miss:
-  // CHECK-NEXT: %[[D2_2:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i64, !nosanitize
-  // CHECK-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED2_2]] {{.*}}, i64 %[[D2_2]]
+  // CHECK: %[[D2_2:[0-9]+]] = ptrtoint %struct.Derived2* %d2 to i64, !nosanitize
+  // CHECK-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED2_2]] {{.*}}, i64 %[[D2_2]]
 }
 
 // PR13127-LABEL: define void @_Z2t4v
 void t4() {
   Base1 p;
   Derived3 *badp = static_cast<Derived3 *>(&p); //< Check that &p isa Derived3.
-  // PR13127: handler.dynamic_type_cache_miss
   // PR13127: %[[P1:[0-9]+]] = ptrtoint %struct.Derived3* {{%[0-9]+}} to i64, !nosanitize
-  // PR13127-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED3]] {{.*}}, i64 %[[P1]]
+  // PR13127-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED3]] {{.*}}, i64 %[[P1]]
 
   static_cast<Base1 *>(badp)->f1(); //< No devirt, test 'badp isa Base1'.
-  // PR13127: handler.dynamic_type_cache_miss
   // PR13127: %[[BADP1:[0-9]+]] = ptrtoint %struct.Base1* {{%[0-9]+}} to i64, !nosanitize
-  // PR13127-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_BASE1]] {{.*}}, i64 %[[BADP1]]
+  // PR13127-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_BASE1]] {{.*}}, i64 %[[BADP1]]
 }
 
 // PR13127-LABEL: define void @_Z2t5v
 void t5() {
   Base1 p;
   Derived4 *badp = static_cast<Derived4 *>(&p); //< Check that &p isa Derived4.
-  // PR13127: handler.dynamic_type_cache_miss:
   // PR13127: %[[P1:[0-9]+]] = ptrtoint %struct.Derived4* {{%[0-9]+}} to i64, !nosanitize
-  // PR13127-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED4_1]] {{.*}}, i64 %[[P1]]
+  // PR13127-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_1]] {{.*}}, i64 %[[P1]]
 
   static_cast<Base1 *>(badp)->f1(); //< Devirt Base1::f1 to Derived4::f1.
-  // PR13127: handler.dynamic_type_cache_miss1:
   // PR13127: %[[BADP1:[0-9]+]] = ptrtoint %struct.Derived4* {{%[0-9]+}} to i64, !nosanitize
-  // PR13127-NEXT: call void @{{[_a-z]+}}({{.*}} [[UBSAN_TI_DERIVED4_2]] {{.*}}, i64 %[[BADP1]]
+  // PR13127-NEXT: call void @__ubsan_handle_dynamic_type_cache{{[_a-z]*}}({{.*}} [[UBSAN_TI_DERIVED4_2]] {{.*}}, i64 %[[BADP1]]
 }




More information about the cfe-commits mailing list