clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@91671 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td
index a7db9a8..0d765a3 100644
--- a/include/clang/Driver/CC1Options.td
+++ b/include/clang/Driver/CC1Options.td
@@ -20,8 +20,8 @@
 
 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">,
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index d3c1b31..b1846b3 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -367,7 +367,7 @@
   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 @@
   }
 
   if (CPUName) {
-    CmdArgs.push_back("-mcpu");
+    CmdArgs.push_back("-target-cpu");
     CmdArgs.push_back(CPUName);
   }
 
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp
index 4147057..07505bb 100644
--- a/lib/Frontend/CompilerInvocation.cpp
+++ b/lib/Frontend/CompilerInvocation.cpp
@@ -599,7 +599,7 @@
   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 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);
 
diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c
index 21d63ec..c16d65b 100644
--- a/test/CodeGen/vector.c
+++ b/test/CodeGen/vector.c
@@ -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() {
diff --git a/test/Driver/clang-translation.c b/test/Driver/clang-translation.c
index 8c54c25..2464f03 100644
--- a/test/Driver/clang-translation.c
+++ b/test/Driver/clang-translation.c
@@ -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
diff --git a/test/Sema/carbon.c b/test/Sema/carbon.c
index c21dc58..f0affd2 100644
--- a/test/Sema/carbon.c
+++ b/test/Sema/carbon.c
@@ -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
diff --git a/test/SemaObjC/cocoa.m b/test/SemaObjC/cocoa.m
index 7e99252..9c92731 100644
--- a/test/SemaObjC/cocoa.m
+++ b/test/SemaObjC/cocoa.m
@@ -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