[cfe-commits] r91671 - in /cfe/trunk: 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
Daniel Dunbar
daniel at zuster.org
Thu Dec 17 22:30:13 PST 2009
Author: ddunbar
Date: Fri Dec 18 00:30:12 2009
New Revision: 91671
URL: http://llvm.org/viewvc/llvm-project?rev=91671&view=rev
Log:
clang -cc1: Rename -mcpu to -target-cpu to match other target options and not alias driver/backend option.
Modified:
cfe/trunk/include/clang/Driver/CC1Options.td
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/lib/Frontend/CompilerInvocation.cpp
cfe/trunk/test/CodeGen/vector.c
cfe/trunk/test/Driver/clang-translation.c
cfe/trunk/test/Sema/carbon.c
cfe/trunk/test/SemaObjC/cocoa.m
Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Dec 18 00:30:12 2009
@@ -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">,
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Dec 18 00:30:12 2009
@@ -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);
}
Modified: cfe/trunk/lib/Frontend/CompilerInvocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInvocation.cpp?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInvocation.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInvocation.cpp Fri Dec 18 00:30:12 2009
@@ -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);
Modified: cfe/trunk/test/CodeGen/vector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/vector.c?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/vector.c (original)
+++ cfe/trunk/test/CodeGen/vector.c Fri Dec 18 00:30:12 2009
@@ -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() {
Modified: cfe/trunk/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang-translation.c?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang-translation.c (original)
+++ cfe/trunk/test/Driver/clang-translation.c Fri Dec 18 00:30:12 2009
@@ -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
Modified: cfe/trunk/test/Sema/carbon.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/carbon.c?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/test/Sema/carbon.c (original)
+++ cfe/trunk/test/Sema/carbon.c Fri Dec 18 00:30:12 2009
@@ -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
Modified: cfe/trunk/test/SemaObjC/cocoa.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaObjC/cocoa.m?rev=91671&r1=91670&r2=91671&view=diff
==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa.m (original)
+++ cfe/trunk/test/SemaObjC/cocoa.m Fri Dec 18 00:30:12 2009
@@ -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
More information about the cfe-commits
mailing list