File tree 1 file changed +29
-0
lines changed
1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 %s -I%S -triple=x86_64-pc-windows-msvc -fstrict-vtable-pointers -disable-llvm-passes -disable-llvm-verifier -O1 -emit-llvm -o %t.ll
2
+ // RUN: FileCheck %s < %t.ll
3
+ // RUN: not llvm-as < %t.ll -o /dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-VERIFIER
4
+
5
+ struct A {
6
+ virtual ~A ();
7
+ };
8
+ struct B : virtual A {};
9
+ class C : B {};
10
+ C foo;
11
+
12
+ // FIXME: This is not supposed to generate invalid IR!
13
+ // CHECK-VERIFIER: Instruction does not dominate all uses!
14
+ // CHECK-VERIFIER-NEXT: %1 = call ptr @llvm.launder.invariant.group.p0(ptr %this1)
15
+ // CHECK-VERIFIER-NEXT: %3 = call ptr @llvm.launder.invariant.group.p0(ptr %1)
16
+
17
+ // CHECK-LABEL: define {{.*}} @"??0C@@QEAA@XZ"(ptr {{.*}} %this, i32 {{.*}} %is_most_derived)
18
+ // CHECK: ctor.init_vbases:
19
+ // CHECK-NEXT: %0 = getelementptr inbounds i8, ptr %this1, i64 0
20
+ // CHECK-NEXT: store ptr @"??_8C@@7B@", ptr %0
21
+ // CHECK-NEXT: %1 = call ptr @llvm.launder.invariant.group.p0(ptr %this1)
22
+ // CHECK-NEXT: %2 = getelementptr inbounds i8, ptr %1, i64 8
23
+ // CHECK-NEXT: %call = call noundef ptr @"??0A@@QEAA@XZ"(ptr {{.*}} %2) #2
24
+ // CHECK-NEXT: br label %ctor.skip_vbases
25
+ // CHECK-EMPTY:
26
+ // CHECK-NEXT: ctor.skip_vbases:
27
+ // FIXME: Should be using '%this1' instead of %1 below.
28
+ // CHECK-NEXT: %3 = call ptr @llvm.launder.invariant.group.p0(ptr %1)
29
+ // CHECK-NEXT: %call3 = call noundef ptr @"??0B@@QEAA@XZ"(ptr {{.*}} %3, i32 noundef 0) #2
You can’t perform that action at this time.
0 commit comments