diff options
author | David Chisnall <csdavec@swan.ac.uk> | 2012-04-09 12:33:41 +0000 |
---|---|---|
committer | David Chisnall <csdavec@swan.ac.uk> | 2012-04-09 12:33:41 +0000 |
commit | a27cf0e6e1d9676edb6ee6f8cc1c6634ded56c74 (patch) | |
tree | acfbfc054f69e2070dbd2ad80e26dbd5381f8098 | |
parent | 36a7cc62923248423d664c95b0840121dfeb8b8c (diff) | |
download | bcm5719-llvm-a27cf0e6e1d9676edb6ee6f8cc1c6634ded56c74.tar.gz bcm5719-llvm-a27cf0e6e1d9676edb6ee6f8cc1c6634ded56c74.zip |
Make a modern Objective-C runtime the default target for *BSD. Don't yet change this on GNU/Linux, where the GCC runtime still tends to be used.
llvm-svn: 154315
-rw-r--r-- | clang/lib/Driver/ToolChains.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains.h b/clang/lib/Driver/ToolChains.h index 66658035729..eaa6be1b0d6 100644 --- a/clang/lib/Driver/ToolChains.h +++ b/clang/lib/Driver/ToolChains.h @@ -459,6 +459,16 @@ class LLVM_LIBRARY_VISIBILITY OpenBSD : public Generic_ELF { public: OpenBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); + virtual bool IsObjCNonFragileABIDefault() const { return true; } + virtual bool IsObjCLegacyDispatchDefault() const { + llvm::Triple::ArchType Arch = getTriple().getArch(); + if (Arch == llvm::Triple::arm || + Arch == llvm::Triple::x86 || + Arch == llvm::Triple::x86_64) + return false; + return true; + } + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, const ActionList &Inputs) const; }; @@ -467,6 +477,16 @@ class LLVM_LIBRARY_VISIBILITY FreeBSD : public Generic_ELF { public: FreeBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); + virtual bool IsObjCNonFragileABIDefault() const { return true; } + virtual bool IsObjCLegacyDispatchDefault() const { + llvm::Triple::ArchType Arch = getTriple().getArch(); + if (Arch == llvm::Triple::arm || + Arch == llvm::Triple::x86 || + Arch == llvm::Triple::x86_64) + return false; + return true; + } + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, const ActionList &Inputs) const; }; @@ -475,6 +495,16 @@ class LLVM_LIBRARY_VISIBILITY NetBSD : public Generic_ELF { public: NetBSD(const Driver &D, const llvm::Triple& Triple, const ArgList &Args); + virtual bool IsObjCNonFragileABIDefault() const { return true; } + virtual bool IsObjCLegacyDispatchDefault() const { + llvm::Triple::ArchType Arch = getTriple().getArch(); + if (Arch == llvm::Triple::arm || + Arch == llvm::Triple::x86 || + Arch == llvm::Triple::x86_64) + return false; + return true; + } + virtual Tool &SelectTool(const Compilation &C, const JobAction &JA, const ActionList &Inputs) const; }; |