diff options
author | Douglas Gregor <dgregor@apple.com> | 2013-02-07 22:59:12 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2013-02-07 22:59:12 +0000 |
commit | 4bedb499eaa00fa6bec341a2f8eb1a66a3aa6d63 (patch) | |
tree | 6fddb5d89cb2f1faf5016bf901034548d01e8673 /clang/lib/Driver | |
parent | 08ec0b611748328c708de60be5d11dd24c2a182c (diff) | |
download | bcm5719-llvm-4bedb499eaa00fa6bec341a2f8eb1a66a3aa6d63.tar.gz bcm5719-llvm-4bedb499eaa00fa6bec341a2f8eb1a66a3aa6d63.zip |
Form the default -fmodules-cache-path= properly.
llvm-svn: 174674
Diffstat (limited to 'clang/lib/Driver')
-rw-r--r-- | clang/lib/Driver/Compilation.cpp | 2 | ||||
-rw-r--r-- | clang/lib/Driver/Tools.cpp | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/Driver/Compilation.cpp b/clang/lib/Driver/Compilation.cpp index 86e617211f8..df904f06b7d 100644 --- a/clang/lib/Driver/Compilation.cpp +++ b/clang/lib/Driver/Compilation.cpp @@ -111,7 +111,7 @@ static bool skipArg(const char *Flag, bool &SkipNextArg) { bool Res = llvm::StringSwitch<bool>(Flag) .Cases("-I", "-MF", "-MT", "-MQ", true) .Cases("-o", "-coverage-file", "-dependency-file", true) - .Cases("-fdebug-compilation-dir", "-fmodule-cache-path", "-idirafter", true) + .Cases("-fdebug-compilation-dir", "-idirafter", true) .Cases("-include", "-include-pch", "-internal-isystem", true) .Cases("-internal-externc-isystem", "-iprefix", "-iwithprefix", true) .Cases("-iwithprefixbefore", "-isysroot", "-isystem", "-iquote", true) diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 0da8ba421d9..77c7d2270b1 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -2714,7 +2714,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, llvm::sys::path::system_temp_directory(/*erasedOnReboot=*/false, DefaultModuleCache); llvm::sys::path::append(DefaultModuleCache, "clang-module-cache"); - CmdArgs.push_back("-fmodules-cache-path"); + const char Arg[] = "-fmodules-cache-path="; + DefaultModuleCache.insert(DefaultModuleCache.begin(), + Arg, Arg + strlen(Arg)); CmdArgs.push_back(Args.MakeArgString(DefaultModuleCache)); } |