aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/ToolChains.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-04-24 18:37:41 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-04-24 18:37:41 +0000
commitf645aaaf274c2f32c9ace457b9e69f041b565c17 (patch)
treed310caabe100bc5f7c1c59f43b91d3d3b0a1c949 /lib/Driver/ToolChains.h
parent77c13e07314422c6e76eda1bd1c7d83181b7e526 (diff)
Driver/Darwin: Fix Objective-C non-fragile ABI and dispatch method defaults, which were wrong in numerous places.
- <rdar://problem/7903449> git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@102257 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/ToolChains.h')
-rw-r--r--lib/Driver/ToolChains.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h
index a307b2bdac..9acc950879 100644
--- a/lib/Driver/ToolChains.h
+++ b/lib/Driver/ToolChains.h
@@ -160,19 +160,20 @@ public:
return !isMacosxVersionLT(10, 6);
}
virtual bool IsObjCNonFragileABIDefault() const {
- // Non-fragile ABI default to on for iPhoneOS and x86-64.
- return isTargetIPhoneOS() || getTriple().getArch() == llvm::Triple::x86_64;
+ // Non-fragile ABI is default for everything but i386.
+ return getTriple().getArch() != llvm::Triple::x86;
}
virtual bool IsObjCLegacyDispatchDefault() const {
// This is only used with the non-fragile ABI.
- return (getTriple().getArch() == llvm::Triple::arm ||
- getTriple().getArch() == llvm::Triple::thumb);
+
+ // Legacy dispatch is used everywhere except on x86_64.
+ return getTriple().getArch() != llvm::Triple::x86_64;
}
virtual bool UseObjCMixedDispatch() const {
- // Mixed dispatch is only used on x86_64 for 10.6 and later.
- return (!isTargetIPhoneOS() &&
- getTriple().getArch() == llvm::Triple::x86_64 &&
- !isMacosxVersionLT(10, 6));
+ // This is only used with the non-fragile ABI and non-legacy dispatch.
+
+ // Mixed dispatch is used everywhere except OS X before 10.6.
+ return !(!isTargetIPhoneOS() && isMacosxVersionLT(10, 6));
}
virtual bool IsUnwindTablesDefault() const;
virtual unsigned GetDefaultStackProtectorLevel() const {