]> granicus.if.org Git - clang/commitdiff
<rdar://problem/13477190> Give the Clang module cache directory some structure, so...
authorDouglas Gregor <dgregor@apple.com>
Thu, 21 Mar 2013 21:48:48 +0000 (21:48 +0000)
committerDouglas Gregor <dgregor@apple.com>
Thu, 21 Mar 2013 21:48:48 +0000 (21:48 +0000)
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>.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@177671 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp
test/Modules/driver.c

index e0e167a9a82580adfca34a48c0ecef3336734ff9..cb84e0a547cfae7a954348092127b5cfd11b0407 100644 (file)
@@ -2803,7 +2803,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
     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));
index 0a787b996a8116ecb6da5c1864e9034f8ab6e901..08fdaab441062d9e57d71251fb41562dc5c217b7 100644 (file)
@@ -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"}}