summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/atomicinit.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/atomicinit.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/atomicinit.cpp')
-rw-r--r--clang/test/CodeGenCXX/atomicinit.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/atomicinit.cpp b/clang/test/CodeGenCXX/atomicinit.cpp
index 4c30ec35212..eb0671f3874 100644
--- a/clang/test/CodeGenCXX/atomicinit.cpp
+++ b/clang/test/CodeGenCXX/atomicinit.cpp
@@ -65,15 +65,15 @@ namespace PR18097 {
};
// CHECK-LABEL: define {{.*}} @__cxx_global_var_init
- // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* nonnull @_ZN7PR180977dynamic1aE, i32 1)
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noalias nonnull @_ZN7PR180977dynamic1aE, i32 1)
_Atomic(X) a = X(1);
// CHECK-LABEL: define {{.*}} @__cxx_global_var_init
- // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* nonnull @_ZN7PR180977dynamic1bE, i32 2)
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noalias nonnull @_ZN7PR180977dynamic1bE, i32 2)
_Atomic(X) b(X(2));
// CHECK-LABEL: define {{.*}} @__cxx_global_var_init
- // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* nonnull @_ZN7PR180977dynamic1cE, i32 3)
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noalias nonnull @_ZN7PR180977dynamic1cE, i32 3)
_Atomic(X) c{X(3)};
struct Y {
@@ -81,7 +81,7 @@ namespace PR18097 {
_Atomic(int) b;
};
// CHECK-LABEL: define {{.*}} @__cxx_global_var_init
- // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* getelementptr inbounds ({{.*}}, {{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 0), i32 4)
+ // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noalias getelementptr inbounds ({{.*}}, {{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 0), i32 4)
// CHECK: store i32 5, i32* getelementptr inbounds ({{.*}}, {{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 1)
Y y = { X(4), 5 };
}
OpenPOWER on IntegriCloud