summaryrefslogtreecommitdiff
path: root/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
diff options
context:
space:
mode:
authorCJ Johnson <johnsoncj@google.com>2020-11-16 15:04:55 -0800
committerRichard Smith <richard@metafoo.co.uk>2020-11-16 17:39:17 -0800
commit69cd776e1ee79e72ccbdad30749eac04579715ee (patch)
treeee387dc3293ca80ac020770d7172c3bed28171d5 /clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
parentba3317d0baacf2a08520735b2b8c89472fc8fc10 (diff)
[CodeGen] Apply 'nonnull' and 'dereferenceable(N)' to 'this' pointer
arguments. * Adds 'nonnull' and 'dereferenceable(N)' to 'this' pointer arguments * Gates 'nonnull' on -f(no-)delete-null-pointer-checks * Introduces this-nonnull.cpp and microsoft-abi-this-nullable.cpp tests to explicitly test the behavior of this change * Refactors hundreds of over-constrained clang tests to permit these attributes, where needed * Updates Clang12 patch notes mentioning this change Reviewed-by: rsmith, jdoerfert Differential Revision: https://reviews.llvm.org/D17993
Diffstat (limited to 'clang/test/CodeGenCXX/vtable-pointer-initialization.cpp')
-rw-r--r--clang/test/CodeGenCXX/vtable-pointer-initialization.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
index 49c8de4ea4f5..6435c533987d 100644
--- a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
+++ b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
@@ -19,14 +19,14 @@ struct A : Base {
Field field;
};
-// CHECK-LABEL: define void @_ZN1AC2Ev(%struct.A* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AC2Ev(%struct.A* {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN4BaseC2Ev(
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i32 0, inrange i32 0, i32 2) to i32 (...)**)
// CHECK: call void @_ZN5FieldC1Ev(
// CHECK: ret void
A::A() { }
-// CHECK-LABEL: define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr
+// CHECK-LABEL: define void @_ZN1AD2Ev(%struct.A* {{[^,]*}} %this) unnamed_addr
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i32 0, inrange i32 0, i32 2) to i32 (...)**)
// CHECK: call void @_ZN5FieldD1Ev(
// CHECK: call void @_ZN4BaseD2Ev(
@@ -41,19 +41,19 @@ struct B : Base {
void f() { B b; }
-// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN1BC2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN1BD2Ev(
-// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
// CHECK: call void @_ZN4BaseC2Ev(
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1B, i32 0, inrange i32 0, i32 2) to i32 (...)**)
// CHECK: call void @_ZN5FieldC1Ev
// CHECK: ret void
-// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(%struct.B* %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1B, i32 0, inrange i32 0, i32 2) to i32 (...)**)
// CHECK: call void @_ZN5FieldD1Ev(
// CHECK: call void @_ZN4BaseD2Ev(