]> granicus.if.org Git - clang/commitdiff
Make a modern Objective-C runtime the default target for *BSD. Don't yet change...
authorDavid Chisnall <csdavec@swan.ac.uk>
Mon, 9 Apr 2012 12:33:41 +0000 (12:33 +0000)
committerDavid Chisnall <csdavec@swan.ac.uk>
Mon, 9 Apr 2012 12:33:41 +0000 (12:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154315 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains.h

index 66658035729053a3a3acc09447631cca75048a8e..eaa6be1b0d6abeb22f2c4a388c8641e9367a5fdf 100644 (file)
@@ -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;
 };