diff options
author | Daniel Dunbar <daniel@zuster.org> | 2010-02-01 21:07:43 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2010-02-01 21:07:43 +0000 |
commit | 609508ce95732e7e7010f79c5207613eced7c9cb (patch) | |
tree | 76b330c6fc97c41e306fd1db4a920c566aab5e78 /lib | |
parent | 2feefe8c195694d134b77503d67f535e04ca2a8b (diff) |
Driver/Darwin: Darwin uses -fobjc-legacy-dispatch on ARM.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95006 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/ToolChains.h | 5 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/lib/Driver/ToolChains.h b/lib/Driver/ToolChains.h index e683c2d484..fbb1136199 100644 --- a/lib/Driver/ToolChains.h +++ b/lib/Driver/ToolChains.h @@ -161,6 +161,11 @@ public: // Non-fragile ABI default to on for iPhoneOS and x86-64. return isTargetIPhoneOS() || getTriple().getArch() == llvm::Triple::x86_64; } + virtual bool IsObjCLegacyDispatchDefault() const { + // This is only used with the non-fragile ABI. + return (getTriple().getArch() == llvm::Triple::arm || + getTriple().getArch() == llvm::Triple::thumb); + } virtual bool IsUnwindTablesDefault() const; virtual unsigned GetDefaultStackProtectorLevel() const { // Stack protectors default to on for 10.6 and beyond. diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 88dffa98f9..b0278b8aec 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -1031,7 +1031,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, // defaults to off. if (Args.hasFlag(options::OPT_fobjc_legacy_dispatch, options::OPT_fno_objc_legacy_dispatch, - false)) + getToolChain().IsObjCLegacyDispatchDefault())) CmdArgs.push_back("-fobjc-legacy-dispatch"); } } |