diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2016-05-05 01:41:07 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2016-05-05 01:41:07 +0000 |
commit | e42181315c06c37254844b3e0cfcef7b54808ce5 (patch) | |
tree | 195752c550fa4a30bd8d16b0d908373cfe01af42 /clang/lib/Driver/MSVCToolChain.cpp | |
parent | 8c21be6b3e55d172212a69264deb43dea7c706c3 (diff) | |
download | bcm5719-llvm-e42181315c06c37254844b3e0cfcef7b54808ce5.tar.gz bcm5719-llvm-e42181315c06c37254844b3e0cfcef7b54808ce5.zip |
Do not add uwtable attribute by default for MachO targets.
r217178 changed clang to add function attribute uwtable by default on
Win64, which caused the __eh_frame section to be emitted by default.
This commit restores the previous behavior for MachO targets.
rdar://problem/25282627
llvm-svn: 268589
Diffstat (limited to 'clang/lib/Driver/MSVCToolChain.cpp')
-rw-r--r-- | clang/lib/Driver/MSVCToolChain.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Driver/MSVCToolChain.cpp b/clang/lib/Driver/MSVCToolChain.cpp index 7f84d1f9d94..acfb507fea5 100644 --- a/clang/lib/Driver/MSVCToolChain.cpp +++ b/clang/lib/Driver/MSVCToolChain.cpp @@ -71,6 +71,11 @@ bool MSVCToolChain::IsUnwindTablesDefault() const { // Emit unwind tables by default on Win64. All non-x86_32 Windows platforms // such as ARM and PPC actually require unwind tables, but LLVM doesn't know // how to generate them yet. + + // Don't emit unwind tables by default for MachO targets. + if (getTriple().isOSBinFormatMachO()) + return false; + return getArch() == llvm::Triple::x86_64; } |