]> granicus.if.org Git - clang/commitdiff
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias...
authorDaniel Dunbar <daniel@zuster.org>
Fri, 18 Dec 2009 06:30:12 +0000 (06:30 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 18 Dec 2009 06:30:12 +0000 (06:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/CC1Options.td
lib/Driver/Tools.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/vector.c
test/Driver/clang-translation.c
test/Sema/carbon.c
test/SemaObjC/cocoa.m

index a7db9a8557dc4a43a9dd453f787e5c1b661a087a..0d765a3767b0467496ca662cb08301107aebee22 100644 (file)
@@ -20,8 +20,8 @@ include "OptParser.td"
 
 def target_abi : Separate<"-target-abi">,
   HelpText<"Target a particular ABI type">;
-def mcpu : Separate<"-mcpu">,
-  HelpText<"Target a specific cpu type ('-mcpu help' for details)">;
+def target_cpu : Separate<"-target-cpu">,
+  HelpText<"Target a specific cpu type">;
 def target_feature : Separate<"-target-feature">,
   HelpText<"Target specific attributes">;
 def triple : Separate<"-triple">,
index d3c1b310edeadea2823b47957fc639b1ebbb4682..b1846b34c2b8eb0b2c60f15396db6ac4c667c2b6 100644 (file)
@@ -367,7 +367,7 @@ void Clang::AddARMTargetArgs(const ArgList &Args,
   CmdArgs.push_back(ABIName);
 
   // Set the CPU based on -march= and -mcpu=.
-  CmdArgs.push_back("-mcpu");
+  CmdArgs.push_back("-target-cpu");
   CmdArgs.push_back(getARMTargetCPU(Args));
 
   // Select the float ABI as determined by -msoft-float, -mhard-float, and
@@ -480,7 +480,7 @@ void Clang::AddX86TargetArgs(const ArgList &Args,
   }
 
   if (CPUName) {
-    CmdArgs.push_back("-mcpu");
+    CmdArgs.push_back("-target-cpu");
     CmdArgs.push_back(CPUName);
   }
 
index 414705716bd2e1c5ad72f249fcd53406a01f5070..07505bbebc276b7a5c48f692dbfbdd3e6a0e15d6 100644 (file)
@@ -599,7 +599,7 @@ static void TargetOptsToArgs(const TargetOptions &Opts,
   Res.push_back("-triple");
   Res.push_back(Opts.Triple);
   if (!Opts.CPU.empty()) {
-    Res.push_back("-mcpu");
+    Res.push_back("-target-cpu");
     Res.push_back(Opts.CPU);
   }
   if (!Opts.ABI.empty()) {
@@ -1252,7 +1252,7 @@ static void ParsePreprocessorOutputArgs(PreprocessorOutputOptions &Opts,
 static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) {
   using namespace cc1options;
   Opts.ABI = getLastArgValue(Args, OPT_target_abi);
-  Opts.CPU = getLastArgValue(Args, OPT_mcpu);
+  Opts.CPU = getLastArgValue(Args, OPT_target_cpu);
   Opts.Triple = getLastArgValue(Args, OPT_triple);
   Opts.Features = getAllArgValues(Args, OPT_target_feature);
 
index 21d63ec144cbf4aec8ee56eac19357f7588f818a..c16d65bebec209048442d1c2994f3b571a52a994 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple i386-apple-darwin9 -mcpu pentium4 -g -emit-llvm %s -o -
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -target-cpu pentium4 -g -emit-llvm %s -o -
 typedef short __v4hi __attribute__ ((__vector_size__ (8)));
 
 void test1() {
index 8c54c25d49aa99637a26a40a1c78c0f2fef1bcd9..2464f03b7a1e06a7bb38b17b8bc855ab57803d15 100644 (file)
@@ -10,9 +10,9 @@
 // RUN: grep '"-masm-verbose"' %t.log
 // RUN: grep '"-fvisibility" "hidden"' %t.log
 // RUN: %clang -ccc-host-triple i386-apple-darwin9 -### -S %s -o %t.s 2> %t.log
-// RUN: grep '"-mcpu" "yonah"' %t.log
+// RUN: grep '"-target-cpu" "yonah"' %t.log
 // RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -o %t.s 2> %t.log
-// RUN: grep '"-mcpu" "core2"' %t.log
+// RUN: grep '"-target-cpu" "core2"' %t.log
 
 // RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -### -S %s 2> %t.log \
 // RUN:   -arch armv7
index c21dc58f2c1c463040480371df64fa83859dc933..f0affd254088d244fc056e02a8bfe2a77b4e8f4b 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -mcpu pentium4 %s -print-stats
+// RUN: %clang_cc1 -target-cpu pentium4 %s -print-stats
 #ifdef __APPLE__
 #include <Carbon/Carbon.h>
 #endif
index 7e99252c035101e84e96c92ce92d791b44be5275..9c92731fe7b9b412a02d5ec0c6b7c4629b482652 100644 (file)
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -mcpu pentium4 %s -print-stats
+// RUN: %clang_cc1 -target-cpu pentium4 %s -print-stats
 #ifdef __APPLE__
 #include <Cocoa/Cocoa.h>
 #endif