summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/init-invariant.cpp
diff options
context:
space:
mode:
authorAnton Bikineev <ant.bikineev@gmail.com>2018-10-10 16:14:51 +0000
committerAnton Bikineev <ant.bikineev@gmail.com>2018-10-10 16:14:51 +0000
commitcc7e74753ae2243f00971e3cfed7d7ee7a0136ed (patch)
treecd349f61ae9f7e9d429b3b4cfcf246e454a48b05 /clang/test/CodeGenCXX/init-invariant.cpp
parent9efbfa88c3f68e12507b1c7658d4812759f4e68a (diff)
downloadbcm5719-llvm-cc7e74753ae2243f00971e3cfed7d7ee7a0136ed.tar.gz
bcm5719-llvm-cc7e74753ae2243f00971e3cfed7d7ee7a0136ed.zip
[CodeGenCXX] Treat 'this' as noalias in constructors
This is currently a clang extension and a resolution of the defect report in the C++ Standard. Differential Revision: https://reviews.llvm.org/D46441 llvm-svn: 344150
Diffstat (limited to 'clang/test/CodeGenCXX/init-invariant.cpp')
-rw-r--r--clang/test/CodeGenCXX/init-invariant.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/init-invariant.cpp b/clang/test/CodeGenCXX/init-invariant.cpp
index 815287c8e11..d8f18a96904 100644
--- a/clang/test/CodeGenCXX/init-invariant.cpp
+++ b/clang/test/CodeGenCXX/init-invariant.cpp
@@ -41,13 +41,13 @@ void e() {
static const A a = A();
}
-// CHECK: call void @_ZN1AC1Ev({{.*}}* nonnull @a)
+// CHECK: call void @_ZN1AC1Ev({{.*}}* noalias nonnull @a)
// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @a to i8*))
-// CHECK: call void @_ZN1BC1Ev({{.*}}* nonnull @b)
+// CHECK: call void @_ZN1BC1Ev({{.*}}* noalias nonnull @b)
// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @b to i8*))
-// CHECK: call void @_ZN1CC1Ev({{.*}}* nonnull @c)
+// CHECK: call void @_ZN1CC1Ev({{.*}}* noalias nonnull @c)
// CHECK-NOT: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @c to i8*))
// CHECK: call i32 @_Z1fv(
@@ -55,6 +55,6 @@ void e() {
// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* bitcast ({{.*}} @d to i8*))
// CHECK-LABEL: define void @_Z1ev(
-// CHECK: call void @_ZN1AC1Ev(%struct.A* nonnull @_ZZ1evE1a)
+// CHECK: call void @_ZN1AC1Ev(%struct.A* noalias nonnull @_ZZ1evE1a)
// CHECK: call {{.*}}@llvm.invariant.start.p0i8(i64 4, i8* {{.*}}bitcast ({{.*}} @_ZZ1evE1a to i8*))
// CHECK-NOT: llvm.invariant.end
OpenPOWER on IntegriCloud