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 | 4274685b639183c1e45974fb963451bcf5f582e7 (patch) | |
| tree | 99cc53e0e8a17513f7e5fcc83517cd31e8728b46 /clang/lib/Driver | |
| parent | 8bed86c43e82e5e7d4414fd71b35418156e00ba9 (diff) | |
| download | bcm5719-llvm-4274685b639183c1e45974fb963451bcf5f582e7.tar.gz bcm5719-llvm-4274685b639183c1e45974fb963451bcf5f582e7.zip  | |
Pass '-mcpu' 'FOO' instead of '-mcpu=FOO'.
llvm-svn: 89498
Diffstat (limited to 'clang/lib/Driver')
| -rw-r--r-- | clang/lib/Driver/CC1Options.cpp | 2 | ||||
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 5 | 
2 files changed, 4 insertions, 3 deletions
diff --git a/clang/lib/Driver/CC1Options.cpp b/clang/lib/Driver/CC1Options.cpp index 7655770ccca..7b0d67a1d2d 100644 --- a/clang/lib/Driver/CC1Options.cpp +++ b/clang/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/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 994bffa475a..265987ea704 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/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=.  | 

