summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/cxx11-initializer-array-new.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/cxx11-initializer-array-new.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/cxx11-initializer-array-new.cpp')
-rw-r--r--clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp b/clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp
index 6e242124fea..f02c0fbc95e 100644
--- a/clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp
+++ b/clang/test/CodeGenCXX/cxx11-initializer-array-new.cpp
@@ -20,22 +20,22 @@ void *p = new S[2][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
// CHECK: %[[S_0:.*]] = bitcast %[[S]]* %[[START_AS_S]] to [3 x %[[S]]]*
//
// CHECK: %[[S_0_0:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_0]], i64 0, i64 0
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_0]], i32 1)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_0]], i32 1)
// CHECK: %[[S_0_1:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_0_0]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_1]], i32 2)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_1]], i32 2)
// CHECK: %[[S_0_2:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_0_1]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_2]], i32 3)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_2]], i32 3)
//
// { 4, 5, 6 }
//
// CHECK: %[[S_1:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_0]], i64 1
//
// CHECK: %[[S_1_0:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_1]], i64 0, i64 0
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_0]], i32 4)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_0]], i32 4)
// CHECK: %[[S_1_1:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_1_0]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_1]], i32 5)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_1]], i32 5)
// CHECK: %[[S_1_2:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_1_1]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_2]], i32 6)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_2]], i32 6)
//
// CHECK-NOT: br i1
// CHECK-NOT: call
@@ -64,22 +64,22 @@ void *q = new S[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
// CHECK: %[[S_0:.*]] = bitcast %[[S]]* %[[START_AS_S]] to [3 x %[[S]]]*
//
// CHECK: %[[S_0_0:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_0]], i64 0, i64 0
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_0]], i32 1)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_0]], i32 1)
// CHECK: %[[S_0_1:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_0_0]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_1]], i32 2)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_1]], i32 2)
// CHECK: %[[S_0_2:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_0_1]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_0_2]], i32 3)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_0_2]], i32 3)
//
// { 4, 5, 6 }
//
// CHECK: %[[S_1:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_0]], i64 1
//
// CHECK: %[[S_1_0:.*]] = getelementptr inbounds [3 x %[[S]]], [3 x %[[S]]]* %[[S_1]], i64 0, i64 0
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_0]], i32 4)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_0]], i32 4)
// CHECK: %[[S_1_1:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_1_0]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_1]], i32 5)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_1]], i32 5)
// CHECK: %[[S_1_2:.*]] = getelementptr inbounds %[[S]], %[[S]]* %[[S_1_1]], i64 1
-// CHECK: call void @_ZN1SC1Ei(%[[S]]* %[[S_1_2]], i32 6)
+// CHECK: call void @_ZN1SC1Ei(%[[S]]* noalias %[[S_1_2]], i32 6)
//
// And the rest.
//
@@ -94,7 +94,7 @@ void *q = new S[n][3]{ { 1, 2, 3 }, { 4, 5, 6 } };
// CHECK: br label
//
// CHECK: %[[CUR:.*]] = phi %[[S]]* [ %[[S_2_AS_S]], {{.*}} ], [ %[[NEXT:.*]], {{.*}} ]
-// CHECK: call void @_ZN1SC1Ev(%[[S]]* %[[CUR]])
+// CHECK: call void @_ZN1SC1Ev(%[[S]]* noalias %[[CUR]])
// CHECK: %[[NEXT]] = getelementptr inbounds %[[S]], %[[S]]* %[[CUR]], i64 1
// CHECK: icmp eq %[[S]]* %[[NEXT]], %[[END]]
// CHECK: br i1
OpenPOWER on IntegriCloud