Skip to content
Snippets Groups Projects
Commit f47686bf authored by Akira Hatanaka's avatar Akira Hatanaka
Browse files

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


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@268589 91177308-0d34-0410-b5e6-96231b3b80d8
parent 6ddd583f
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
// RUN: %clang -target x86_64-pc-win32-macho -### -S %s -o %t.s 2>&1 | FileCheck %s
// Do not add function attribute "uwtable" for macho targets.
// CHECK-NOT: -munwind-tables
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment