ADT/Triple: Renambe isOSX... methods to isMacOSX for consistency with the OS
authorDaniel Dunbar <daniel@zuster.org>
Wed, 20 Apr 2011 00:14:25 +0000 (00:14 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Wed, 20 Apr 2011 00:14:25 +0000 (00:14 +0000)
triple component.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129838 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/Triple.h
lib/CodeGen/TargetLoweringObjectFileImpl.cpp
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCSubtarget.h
lib/Target/TargetLibraryInfo.cpp
lib/Target/X86/X86FastISel.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86Subtarget.cpp
tools/llc/llc.cpp

index 2f427c02ddca546a3661117901475c7279905079..4cfad31df53a547d07143a62aa6b76614ba9d8c8 100644 (file)
@@ -266,15 +266,15 @@ public:
     return false;
   }
 
-  /// isOSX - Is this an OS X triple. For legacy reasons, we support both
+  /// isMacOSX - Is this a Mac OS X triple. For legacy reasons, we support both
   /// "darwin" and "osx" as OS X triples.
-  bool isOSX() const {
+  bool isMacOSX() const {
     return getOS() == Triple::Darwin || getOS() == Triple::MacOSX;
   }
 
   /// isOSDarwin - Is this a "Darwin" OS (OS X or iOS).
   bool isOSDarwin() const {
-    return isOSX() ||getOS() == Triple::IOS;
+    return isMacOSX() ||getOS() == Triple::IOS;
   }
 
   /// isOSWindows - Is this a "Windows" OS.
@@ -283,12 +283,12 @@ public:
       getOS() == Triple::MinGW32;
   }
 
-  /// isOSXVersionLT - Comparison function for checking OS X version
+  /// isMacOSXVersionLT - Comparison function for checking OS X version
   /// compatibility, which handles supporting skewed version numbering schemes
   /// used by the "darwin" triples.
-  unsigned isOSXVersionLT(unsigned Major, unsigned Minor = 0,
+  unsigned isMacOSXVersionLT(unsigned Major, unsigned Minor = 0,
                           unsigned Micro = 0) const {
-    assert(isOSX() && "Not an OS X triple!");
+    assert(isMacOSX() && "Not an OS X triple!");
 
     // If this is OS X, expect a sane version number.
     if (getOS() == Triple::MacOSX)
index 82c186e1c3f8943fce1d263a51fb58448dc326f0..7e63d60fa6db77d78c8cfbbee440f74ccc65d487 100644 (file)
@@ -481,7 +481,7 @@ void TargetLoweringObjectFileMachO::Initialize(MCContext &Ctx,
 
   // .comm doesn't support alignment before Leopard.
   Triple T(((LLVMTargetMachine&)TM).getTargetTriple());
-  if (T.isOSX() && T.isOSXVersionLT(10, 5))
+  if (T.isMacOSX() && T.isMacOSXVersionLT(10, 5))
     CommDirectiveSupportsAlignment = false;
 
   TargetLoweringObjectFile::Initialize(Ctx, TM);
index 83cfc38070cf571186dd88bcc95761dfdfa6f4bc..128522c8843138f53aba0dd2b0667037ba3ac35a 100644 (file)
@@ -2444,8 +2444,8 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
     if (!DAG.getTarget().getSubtarget<PPCSubtarget>().isJITCodeModel()) {
       unsigned OpFlags = 0;
       if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
-          (!PPCSubTarget.getTargetTriple().isOSX() ||
-           PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5)) &&
+          (!PPCSubTarget.getTargetTriple().isMacOSX() ||
+           PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5)) &&
           (G->getGlobal()->isDeclaration() ||
            G->getGlobal()->isWeakForLinker())) {
         // PC-relative references to external symbols should go through $stub,
@@ -2468,8 +2468,8 @@ unsigned PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag,
     unsigned char OpFlags = 0;
 
     if (DAG.getTarget().getRelocationModel() != Reloc::Static &&
-        (!PPCSubTarget.getTargetTriple().isOSX() ||
-         PPCSubTarget.getTargetTriple().isOSXVersionLT(10, 5))) {
+        (!PPCSubTarget.getTargetTriple().isMacOSX() ||
+         PPCSubTarget.getTargetTriple().isMacOSXVersionLT(10, 5))) {
       // PC-relative references to external symbols should go through $stub,
       // unless we're building with the leopard linker or later, which
       // automatically synthesizes these stubs.
index d1fac988928bd75e48890e2d505f0a91b88baba2..8fd1a447692d762c1e0244427e8931ce4ea7a5c5 100644 (file)
@@ -138,7 +138,7 @@ public:
   const Triple &getTargetTriple() const { return TargetTriple; }
 
   /// isDarwin - True if this is any darwin platform.
-  bool isDarwin() const { return TargetTriple.isOSX(); }
+  bool isDarwin() const { return TargetTriple.isMacOSX(); }
 
   bool isDarwinABI() const { return isDarwin(); }
   bool isSVR4ABI() const { return !isDarwin(); }
index 104c5d4068e1ce1f7dcffc10aca8010119c4a865..e336b09291a46f56d594e9f6f8b8cb1d4afa42a2 100644 (file)
@@ -28,8 +28,8 @@ static void initialize(TargetLibraryInfo &TLI, const Triple &T) {
 
   
   // memset_pattern16 is only available on iOS 3.0 and Mac OS/X 10.5 and later.
-  if (T.isOSX()) {
-    if (T.isOSXVersionLT(10, 5))
+  if (T.isMacOSX()) {
+    if (T.isMacOSXVersionLT(10, 5))
       TLI.setUnavailable(LibFunc::memset_pattern16);
   } else if (T.getOS() == Triple::IOS) {
     if (T.isOSVersionLT(3, 0))
index a2e328dad740f90919d2139b12adc0534962fb69..b35ec0d3a3f9154fb28ab42583258bc808ab2eaf 100644 (file)
@@ -1773,8 +1773,8 @@ bool X86FastISel::X86SelectCall(const Instruction *I) {
       OpFlags = X86II::MO_PLT;
     } else if (Subtarget->isPICStyleStubAny() &&
                (GV->isDeclaration() || GV->isWeakForLinker()) &&
-               (!Subtarget->getTargetTriple().isOSX() ||
-                Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+               (!Subtarget->getTargetTriple().isMacOSX() ||
+                Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
       // PC-relative references to external symbols should go through $stub,
       // unless we're building with the leopard linker or later, which
       // automatically synthesizes these stubs.
index ad858b57bab29d0e61b9a7358b1c91ac36d5d991..703c01d373ef84e5ea809017b374aeedc0e13a26 100644 (file)
@@ -2281,8 +2281,8 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
         OpFlags = X86II::MO_PLT;
       } else if (Subtarget->isPICStyleStubAny() &&
                  (GV->isDeclaration() || GV->isWeakForLinker()) &&
-                 (!Subtarget->getTargetTriple().isOSX() ||
-                  Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+                 (!Subtarget->getTargetTriple().isMacOSX() ||
+                  Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
         // PC-relative references to external symbols should go through $stub,
         // unless we're building with the leopard linker or later, which
         // automatically synthesizes these stubs.
@@ -2301,8 +2301,8 @@ X86TargetLowering::LowerCall(SDValue Chain, SDValue Callee,
         getTargetMachine().getRelocationModel() == Reloc::PIC_) {
       OpFlags = X86II::MO_PLT;
     } else if (Subtarget->isPICStyleStubAny() &&
-               (!Subtarget->getTargetTriple().isOSX() ||
-                Subtarget->getTargetTriple().isOSXVersionLT(10, 5))) {
+               (!Subtarget->getTargetTriple().isMacOSX() ||
+                Subtarget->getTargetTriple().isMacOSXVersionLT(10, 5))) {
       // PC-relative references to external symbols should go through $stub,
       // unless we're building with the leopard linker or later, which
       // automatically synthesizes these stubs.
index b02602e88f8cc95f1f3291b576dcce17ea55b3b7..ba5864ef0e0a20f12ceab150dfa3d5e35736bba1 100644 (file)
@@ -144,7 +144,8 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const {
 /// passed as the second argument. Otherwise it returns null.
 const char *X86Subtarget::getBZeroEntry() const {
   // Darwin 10 has a __bzero entry point for this purpose.
-  if (getTargetTriple().isOSX() && !getTargetTriple().isOSXVersionLT(10, 6))
+  if (getTargetTriple().isMacOSX() &&
+      !getTargetTriple().isMacOSXVersionLT(10, 6))
     return "__bzero";
 
   return 0;
index 99d43c8daf4cd231583bffd7a93627c0218b2f55..2ff87945996a3ce13ea0994b794c12563f2ba23c 100644 (file)
@@ -280,7 +280,8 @@ int main(int argc, char **argv) {
     Target.setMCUseLoc(false);
 
   // Disable .loc support for older OS X versions.
-  if (TheTriple.isOSX() && TheTriple.isOSXVersionLT(10, 5))
+  if (TheTriple.isMacOSX() &&
+      TheTriple.isMacOSXVersionLT(10, 5))
     Target.setMCUseLoc(false);
 
   // Figure out where we are going to send the output...