[cfe-commits] r67621 - /cfe/trunk/tools/clang-cc/clang.cpp

Chris Lattner sabre at nondot.org
Tue Mar 24 09:18:42 PDT 2009


Author: lattner
Date: Tue Mar 24 11:18:41 2009
New Revision: 67621

URL: http://llvm.org/viewvc/llvm-project?rev=67621&view=rev
Log:
-arch ppc should change the triple to powerpc-foo not to ppc-foo.
Similarly for ppc64.  This should probably move into the driver, along
with all the other target selection stuff other than -triple.


Modified:
    cfe/trunk/tools/clang-cc/clang.cpp

Modified: cfe/trunk/tools/clang-cc/clang.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/tools/clang-cc/clang.cpp?rev=67621&r1=67620&r2=67621&view=diff

==============================================================================
--- cfe/trunk/tools/clang-cc/clang.cpp (original)
+++ cfe/trunk/tools/clang-cc/clang.cpp Tue Mar 24 11:18:41 2009
@@ -807,6 +807,12 @@
               Triple.c_str());
       exit(1);
     }
+    
+    // Canonicalize -arch ppc to add "powerpc" to the triple, not ppc.
+    if (Arch == "ppc")
+      Arch = "powerpc";
+    else if (Arch == "ppc64")
+      Arch = "powerpc64";
   
     Triple = Arch + std::string(Triple.begin()+FirstDashIdx, Triple.end());
   }





More information about the cfe-commits mailing list