diff options
author | Justin Bogner <mail@justinbogner.com> | 2014-10-20 22:47:23 +0000 |
---|---|---|
committer | Justin Bogner <mail@justinbogner.com> | 2014-10-20 22:47:23 +0000 |
commit | 659ecc3120eb7797ce8ec85d2748e3b2f5065a5a (patch) | |
tree | f09aa7809cdbf3178db661386ef7570ef53bac39 /clang/lib/Driver/Tools.cpp | |
parent | cdb72f369f94be40a4f2651ac36f65caa4034bb5 (diff) | |
download | llvm-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.cpp | 3 |
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)); |