diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-11-20 22:21:52 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-11-20 22:21:52 +0000 |
commit | a31100e62f83933432df9092a04e48f9e5561a14 (patch) | |
tree | b78230c5cf86c275ddf49aa72d5215111ed33a85 | |
parent | 66861e09d590994a8b941eaa328e4d8f33adec9e (diff) |
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@89498 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/CC1Options.td | 2 | ||||
-rw-r--r-- | lib/Driver/CC1Options.cpp | 2 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 5 | ||||
-rw-r--r-- | test/CodeGen/vector.c | 2 | ||||
-rw-r--r-- | test/Sema/carbon.c | 2 | ||||
-rw-r--r-- | test/SemaObjC/cocoa.m | 2 | ||||
-rw-r--r-- | tools/clang-cc/Options.cpp | 2 |
7 files changed, 9 insertions, 8 deletions
diff --git a/include/clang/Driver/CC1Options.td b/include/clang/Driver/CC1Options.td index 5b64199e02..e2042261ca 100644 --- a/include/clang/Driver/CC1Options.td +++ b/include/clang/Driver/CC1Options.td @@ -19,7 +19,7 @@ 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)">; + HelpText<"Target a specific cpu type ('-mcpu help' for details)">; def target_feature : Separate<"-target-feature">, HelpText<"Target specific attributes">; def triple : Separate<"-triple">, diff --git a/lib/Driver/CC1Options.cpp b/lib/Driver/CC1Options.cpp index 7655770ccc..7b0d67a1d2 100644 --- a/lib/Driver/CC1Options.cpp +++ b/lib/Driver/CC1Options.cpp @@ -136,7 +136,7 @@ static void ParseTargetArgs(TargetOptions &Opts, ArgList &Args) { 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; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 994bffa475..265987ea70 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -209,7 +209,7 @@ void Clang::AddPreprocessingOptions(const Driver &D, /// 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 @@ void Clang::AddARMTargetArgs(const ArgList &Args, 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=. diff --git a/test/CodeGen/vector.c b/test/CodeGen/vector.c index 2945ebaa4d..21a03d0593 100644 --- a/test/CodeGen/vector.c +++ b/test/CodeGen/vector.c @@ -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() { diff --git a/test/Sema/carbon.c b/test/Sema/carbon.c index 5eda4385ac..8292ba8a50 100644 --- a/test/Sema/carbon.c +++ b/test/Sema/carbon.c @@ -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 diff --git a/test/SemaObjC/cocoa.m b/test/SemaObjC/cocoa.m index b73b3c4ccd..7dab9f55e7 100644 --- a/test/SemaObjC/cocoa.m +++ b/test/SemaObjC/cocoa.m @@ -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 diff --git a/tools/clang-cc/Options.cpp b/tools/clang-cc/Options.cpp index 7b40a667b3..95c81a513f 100644 --- a/tools/clang-cc/Options.cpp +++ b/tools/clang-cc/Options.cpp @@ -757,7 +757,7 @@ TargetABI("target-abi", 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")); |