Home | History | Annotate | Download | only in CodeGenCXX
      1 // RUN: echo "type:attr:uuid" > %t.txt
      2 // RUN: %clang_cc1 -fms-extensions -fsanitize=cfi-vcall -fsanitize-blacklist=%t.txt -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOUUID %s
      3 // RUN: echo "type:std::*" > %t.txt
      4 // RUN: %clang_cc1 -fms-extensions -fsanitize=cfi-vcall -fsanitize-blacklist=%t.txt -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=NOSTD %s
      5 
      6 struct __declspec(uuid("00000000-0000-0000-0000-000000000000")) S1 {
      7   virtual void f();
      8 };
      9 
     10 namespace std {
     11 
     12 struct S2 {
     13   virtual void f();
     14 };
     15 
     16 }
     17 
     18 // CHECK: define{{.*}}s1f
     19 // NOSTD: llvm.bitset.test
     20 // NOUUID-NOT: llvm.bitset.test
     21 void s1f(S1 *s1) {
     22   s1->f();
     23 }
     24 
     25 // CHECK: define{{.*}}s2f
     26 // NOSTD-NOT: llvm.bitset.test
     27 // NOUUID: llvm.bitset.test
     28 void s2f(std::S2 *s2) {
     29   s2->f();
     30 }
     31