aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-10-20 22:47:23 +0000
committerJustin Bogner <mail@justinbogner.com>2014-10-20 22:47:23 +0000
commit659ecc3120eb7797ce8ec85d2748e3b2f5065a5a (patch)
treef09aa7809cdbf3178db661386ef7570ef53bac39 /clang/lib/Driver/Tools.cpp
parentcdb72f369f94be40a4f2651ac36f65caa4034bb5 (diff)
downloadllvm-659ecc3120eb7797ce8ec85d2748e3b2f5065a5a.zip
llvm-659ecc3120eb7797ce8ec85d2748e3b2f5065a5a.tar.gz
llvm-659ecc3120eb7797ce8ec85d2748e3b2f5065a5a.tar.bz2
Driver: Consolidate the logic for naming the module crashdump cache
List the module cache we use for crashdumps as a tempfile. This simplifies how we pick up this directory when generating the actual crash diagnostic and removes some duplicate logic. llvm-svn: 220241
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index f5b6bd8..ea5c3ab 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -3860,6 +3860,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (HaveModules && C.isForDiagnostics()) {
SmallString<128> VFSDir(Output.getFilename());
llvm::sys::path::replace_extension(VFSDir, ".cache");
+ // Add the cache directory as a temp so the crash diagnostics pick it up.
+ C.addTempFile(Args.MakeArgString(VFSDir));
+
llvm::sys::path::append(VFSDir, "vfs");
CmdArgs.push_back("-module-dependency-dir");
CmdArgs.push_back(Args.MakeArgString(VFSDir));