summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/new-array-init.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2016-04-07 21:46:12 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2016-04-07 21:46:12 +0000
commit11e01c96af3b0f7d566cd47b317d49574161a167 (patch)
tree1339d665c66e8691c9d0f367deacdfd0be9b447d /test/CodeGenCXX/new-array-init.cpp
parent02c712e05977f0020bc16ad068f0453284b102bc (diff)
Replace Sema-level implementation of -fassume-sane-operator-new with a
CodeGen-level implementation. Instead of adding an attribute to clang's FunctionDecl, add the IR attribute directly. This means a module built with this flag is now compatible with code built without it and vice versa. This change also results in the 'noalias' attribute no longer being added to calls to operator new in the IR; it's now only added to the declaration. It also fixes a bug where we failed to add the attribute to the 'nothrow' versions (because we didn't implicitly declare them, there was no good time to inject a fake attribute). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265728 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/new-array-init.cpp')
-rw-r--r--test/CodeGenCXX/new-array-init.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGenCXX/new-array-init.cpp b/test/CodeGenCXX/new-array-init.cpp
index 6b76f471a2..602f93c34f 100644
--- a/test/CodeGenCXX/new-array-init.cpp
+++ b/test/CodeGenCXX/new-array-init.cpp
@@ -14,7 +14,7 @@ void fn(int n) {
// CHECK-LABEL: define void @_Z15const_underflowv
void const_underflow() {
// CHECK-NOT: icmp ult i{{32|64}} %{{[^ ]+}}, 3
- // CHECK: call noalias i8* @_Zna{{.}}(i{{32|64}} -1)
+ // CHECK: call i8* @_Zna{{.}}(i{{32|64}} -1)
new int[2] { 1, 2, 3 };
}
@@ -37,7 +37,7 @@ void check_array_value_init() {
struct S;
new (int S::*[3][4][5]) ();
- // CHECK: call noalias i8* @_Zna{{.}}(i{{32 240|64 480}})
+ // CHECK: call i8* @_Zna{{.}}(i{{32 240|64 480}})
// CHECK: getelementptr inbounds i{{32|64}}, i{{32|64}}* {{.*}}, i{{32|64}} 60
// CHECK: phi