diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-07 21:46:12 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2016-04-07 21:46:12 +0000 |
commit | 351241c83ea67cf4cc31b3e30b952ec45c9736e1 (patch) | |
tree | 88bbd41c8f3073d0873a01ed43bef135e0114d58 /clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp | |
parent | aac71a4a0eb420173239a6acb6d192570c974464 (diff) | |
download | bcm5719-llvm-351241c83ea67cf4cc31b3e30b952ec45c9736e1.tar.gz bcm5719-llvm-351241c83ea67cf4cc31b3e30b952ec45c9736e1.zip |
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).
llvm-svn: 265728
Diffstat (limited to 'clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp b/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp index 1ff01820bb1..5b245a4aacc 100644 --- a/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp +++ b/clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp @@ -10,13 +10,13 @@ long *alloc_long() { return rv; } // O32-LABEL: define i32* @_Z10alloc_longv() -// O32: call noalias i8* @_Znwj(i32 signext 4) +// O32: call i8* @_Znwj(i32 signext 4) // N32-LABEL: define i32* @_Z10alloc_longv() -// N32: call noalias i8* @_Znwj(i32 signext 4) +// N32: call i8* @_Znwj(i32 signext 4) // N64-LABEL: define i64* @_Z10alloc_longv() -// N64: call noalias i8* @_Znwm(i64 zeroext 8) +// N64: call i8* @_Znwm(i64 zeroext 8) long *alloc_long_array() { long *rv = new long[2]; @@ -24,13 +24,13 @@ long *alloc_long_array() { } // O32-LABEL: define i32* @_Z16alloc_long_arrayv() -// O32: call noalias i8* @_Znaj(i32 signext 8) +// O32: call i8* @_Znaj(i32 signext 8) // N32-LABEL: define i32* @_Z16alloc_long_arrayv() -// N32: call noalias i8* @_Znaj(i32 signext 8) +// N32: call i8* @_Znaj(i32 signext 8) // N64-LABEL: define i64* @_Z16alloc_long_arrayv() -// N64: call noalias i8* @_Znam(i64 zeroext 16) +// N64: call i8* @_Znam(i64 zeroext 16) #include <stddef.h> |