r177671 - <rdar://problem/13477190> Give the Clang module cache directory some structure, so it's easier to find.
Douglas Gregor
dgregor at apple.com
Thu Mar 21 14:48:48 PDT 2013
Author: dgregor
Date: Thu Mar 21 16:48:48 2013
New Revision: 177671
URL: http://llvm.org/viewvc/llvm-project?rev=177671&view=rev
Log:
<rdar://problem/13477190> Give the Clang module cache directory some structure, so it's easier to find.
We now put the Clang module cache in
<system-temp-directory>/org.llvm.clang/ModuleCache. Perhaps some day
there will be other caches under <system-temp-directory>/org.llvm.clang>.
Modified:
cfe/trunk/lib/Driver/Tools.cpp
cfe/trunk/test/Modules/driver.c
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=177671&r1=177670&r2=177671&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu Mar 21 16:48:48 2013
@@ -2803,7 +2803,8 @@ void Clang::ConstructJob(Compilation &C,
SmallString<128> DefaultModuleCache;
llvm::sys::path::system_temp_directory(/*erasedOnReboot=*/false,
DefaultModuleCache);
- llvm::sys::path::append(DefaultModuleCache, "clang-module-cache");
+ llvm::sys::path::append(DefaultModuleCache, "org.llvm.clang");
+ llvm::sys::path::append(DefaultModuleCache, "ModuleCache");
const char Arg[] = "-fmodules-cache-path=";
DefaultModuleCache.insert(DefaultModuleCache.begin(),
Arg, Arg + strlen(Arg));
Modified: cfe/trunk/test/Modules/driver.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/driver.c?rev=177671&r1=177670&r2=177671&view=diff
==============================================================================
--- cfe/trunk/test/Modules/driver.c (original)
+++ cfe/trunk/test/Modules/driver.c Thu Mar 21 16:48:48 2013
@@ -1,6 +1,6 @@
// RUN: %clang -fmodules %s -### 2>&1 | FileCheck -check-prefix NO_MODULE_CACHE %s
// RUN: %clang -fmodules -fmodules-cache-path=blarg %s -### 2>&1 | FileCheck -check-prefix WITH_MODULE_CACHE %s
-// CHECK-NO_MODULE_CACHE: {{clang.*"-fmodules-cache-path=.*clang-module-cache"}}
+// CHECK-NO_MODULE_CACHE: {{clang.*"-fmodules-cache-path=.*ModuleCache"}}
// CHECK-WITH_MODULE_CACHE: {{clang.*"-fmodules-cache-path=blarg"}}
More information about the cfe-commits
mailing list