[cfe-commits] r89498 - in /cfe/trunk: include/clang/Driver/CC1Options.td lib/Driver/CC1Options.cpp lib/Driver/Tools.cpp test/CodeGen/vector.c test/Sema/carbon.c test/SemaObjC/cocoa.m tools/clang-cc/Options.cpp

Daniel Dunbar daniel at zuster.org
Fri Nov 20 14:21:52 PST 2009


Author: ddunbar
Date: Fri Nov 20 16:21:52 2009
New Revision: 89498

URL: http://llvm.org/viewvc/llvm-project?rev=89498&view=rev
Log:
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.

Modified:
    cfe/trunk/include/clang/Driver/CC1Options.td
    cfe/trunk/lib/Driver/CC1Options.cpp
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/CodeGen/vector.c
    cfe/trunk/test/Sema/carbon.c
    cfe/trunk/test/SemaObjC/cocoa.m
    cfe/trunk/tools/clang-cc/Options.cpp

Modified: cfe/trunk/include/clang/Driver/CC1Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/CC1Options.td?rev=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/include/clang/Driver/CC1Options.td (original)
+++ cfe/trunk/include/clang/Driver/CC1Options.td Fri Nov 20 16:21:52 2009
@@ -19,7 +19,7 @@
 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)">;
+  HelpText<"Target a specific cpu type ('-mcpu help' for details)">;
 def target_feature : Separate<"-target-feature">,
   HelpText<"Target specific attributes">;
 def triple : Separate<"-triple">,

Modified: cfe/trunk/lib/Driver/CC1Options.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/CC1Options.cpp?rev=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/CC1Options.cpp (original)
+++ cfe/trunk/lib/Driver/CC1Options.cpp Fri Nov 20 16:21:52 2009
@@ -136,7 +136,7 @@
 
 void CompilerInvocation::CreateFromArgs(CompilerInvocation &Res,
                            const llvm::SmallVectorImpl<llvm::StringRef> &Args) {
-  // This is gratuitous, but until we switch the driver to using StringRe we
+  // This is gratuitous, but until we switch the driver to using StringRef we
   // need to get C strings.
   llvm::SmallVector<std::string, 16> StringArgs(Args.begin(), Args.end());
   llvm::SmallVector<const char *, 16> CStringArgs;

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Fri Nov 20 16:21:52 2009
@@ -209,7 +209,7 @@
 /// getARMTargetCPU - Get the (LLVM) name of the ARM cpu we are targetting.
 //
 // FIXME: tblgen this.
-static llvm::StringRef getARMTargetCPU(const ArgList &Args) {
+static const char *getARMTargetCPU(const ArgList &Args) {
   // FIXME: Warn on inconsistent use of -mcpu and -march.
 
   // If we have -mcpu=, use that.
@@ -370,7 +370,8 @@
   CmdArgs.push_back(ABIName);
 
   // Set the CPU based on -march= and -mcpu=.
-  CmdArgs.push_back(Args.MakeArgString("-mcpu=" + getARMTargetCPU(Args)));
+  CmdArgs.push_back("-mcpu");
+  CmdArgs.push_back(getARMTargetCPU(Args));
 
   // Select the float ABI as determined by -msoft-float, -mhard-float, and
   // -mfloat-abi=.

Modified: cfe/trunk/test/CodeGen/vector.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/vector.c?rev=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/test/CodeGen/vector.c (original)
+++ cfe/trunk/test/CodeGen/vector.c Fri Nov 20 16:21:52 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -triple i386-apple-darwin9 -mcpu=pentium4 -g -emit-llvm %s -o -
+// RUN: clang-cc -triple i386-apple-darwin9 -mcpu pentium4 -g -emit-llvm %s -o -
 typedef short __v4hi __attribute__ ((__vector_size__ (8)));
 
 void test1() {

Modified: cfe/trunk/test/Sema/carbon.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/carbon.c?rev=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/test/Sema/carbon.c (original)
+++ cfe/trunk/test/Sema/carbon.c Fri Nov 20 16:21:52 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -mcpu=pentium4 %s -print-stats
+// RUN: clang-cc -mcpu 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=89498&r1=89497&r2=89498&view=diff

==============================================================================
--- cfe/trunk/test/SemaObjC/cocoa.m (original)
+++ cfe/trunk/test/SemaObjC/cocoa.m Fri Nov 20 16:21:52 2009
@@ -1,4 +1,4 @@
-// RUN: clang-cc -mcpu=pentium4 %s -print-stats
+// RUN: clang-cc -mcpu pentium4 %s -print-stats
 #ifdef __APPLE__
 #include <Cocoa/Cocoa.h>
 #endif

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

==============================================================================
--- cfe/trunk/tools/clang-cc/Options.cpp (original)
+++ cfe/trunk/tools/clang-cc/Options.cpp Fri Nov 20 16:21:52 2009
@@ -757,7 +757,7 @@
 
 static llvm::cl::opt<std::string>
 TargetCPU("mcpu",
-         llvm::cl::desc("Target a specific cpu type (-mcpu=help for details)"));
+         llvm::cl::desc("Target a specific cpu type ('-mcpu help' for details)"));
 
 static llvm::cl::list<std::string>
 TargetFeatures("target-feature", llvm::cl::desc("Target specific attributes"));





More information about the cfe-commits mailing list