diff options
| author | Bob Wilson <bob.wilson@apple.com> | 2014-04-01 01:38:16 +0000 |
|---|---|---|
| committer | Bob Wilson <bob.wilson@apple.com> | 2014-04-01 01:38:16 +0000 |
| commit | bd3bddeedd0cf47e6dff27bf1f5f417f18234bbe (patch) | |
| tree | a869a8e325fcc2e532a4e58d22b28bd006fd58e2 /lib/CodeGen/CodeGenFunction.cpp | |
| parent | 1f27b5db16ee5bc7496ba3b06f38deb609402c61 (diff) | |
| download | clang-bd3bddeedd0cf47e6dff27bf1f5f417f18234bbe.tar.gz clang-bd3bddeedd0cf47e6dff27bf1f5f417f18234bbe.tar.bz2 clang-bd3bddeedd0cf47e6dff27bf1f5f417f18234bbe.tar.xz | |
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>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205272 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions
