summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/arm.cpp
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2014-04-01 01:38:16 +0000
committerBob Wilson <bob.wilson@apple.com>2014-04-01 01:38:16 +0000
commitfc6297f31499b13f297ec909dd309a1e89096b26 (patch)
tree5becf5ad2179e884e1ab7670828ea1ae17d0741d /clang/test/CodeGenCXX/arm.cpp
parent65cbbd4ac53496742ba275e40ada4325e8fc6f68 (diff)
downloadbcm5719-llvm-fc6297f31499b13f297ec909dd309a1e89096b26.tar.gz
bcm5719-llvm-fc6297f31499b13f297ec909dd309a1e89096b26.zip
Disable this-return optimizations when targeting iOS 5 and earlier.
Clang implements the part of the ARM ABI saying that certain functions (e.g., constructors and destructors) return "this", but Apple's version of gcc and llvm-gcc did not. The libstdc++ dylib on iOS 5 was built with llvm-gcc, which means that clang cannot safely assume that code from the C++ runtime will correctly follow the ABI. It is also possible to run into this problem when linking with other libraries built with gcc or llvm-gcc. Even though there is no way to reliably detect that situation, it is most likely to come up when targeting older versions of iOS. Disabling the optimization for any code targeting iOS 5 solves the libstdc++ problem and has a reasonably good chance of fixing the issue for other older libraries as well. <rdar://problem/16377159> llvm-svn: 205272
Diffstat (limited to 'clang/test/CodeGenCXX/arm.cpp')
-rw-r--r--clang/test/CodeGenCXX/arm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGenCXX/arm.cpp b/clang/test/CodeGenCXX/arm.cpp
index 2fb9c49bb70..2790199446d 100644
--- a/clang/test/CodeGenCXX/arm.cpp
+++ b/clang/test/CodeGenCXX/arm.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 %s -triple=thumbv7-apple-ios3.0 -fno-use-cxa-atexit -target-abi apcs-gnu -emit-llvm -o - -fexceptions | FileCheck %s
+// RUN: %clang_cc1 %s -triple=thumbv7-apple-ios6.0 -fno-use-cxa-atexit -target-abi apcs-gnu -emit-llvm -o - -fexceptions | FileCheck %s
// CHECK: @_ZZN5test74testEvE1x = internal global i32 0, align 4
// CHECK: @_ZGVZN5test74testEvE1x = internal global i32 0
OpenPOWER on IntegriCloud