aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Tooling/JSONCompilationDatabase.cpp
diff options
context:
space:
mode:
authorKadir Cetinkaya <kadircet@google.com>2019-11-29 15:37:14 +0100
committerKadir Cetinkaya <kadircet@google.com>2019-12-04 15:13:12 +0100
commit75656005dbc8866e1888932a68a830b0df403560 (patch)
treee8fab392d5c236a8c49e5ab1b6577d5f187db64f /clang/lib/Tooling/JSONCompilationDatabase.cpp
parent45ef055d4ffda4d2b04b62f73e36cc6d5252758b (diff)
downloadllvm-75656005dbc8866e1888932a68a830b0df403560.zip
llvm-75656005dbc8866e1888932a68a830b0df403560.tar.gz
llvm-75656005dbc8866e1888932a68a830b0df403560.tar.bz2
[llvm][Support] Take in CurrentDirectory as a parameter in ExpandResponseFiles
Summary: This is a follow-up to D70769 and D70222, which allows propagation of current directory down to ExpandResponseFiles for handling of relative paths. Previously clients had to mutate FS to achieve that, which is not thread-safe and can even be thread-hostile in the case of real file system. Reviewers: sammccall Subscribers: hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D70857
Diffstat (limited to 'clang/lib/Tooling/JSONCompilationDatabase.cpp')
-rw-r--r--clang/lib/Tooling/JSONCompilationDatabase.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Tooling/JSONCompilationDatabase.cpp b/clang/lib/Tooling/JSONCompilationDatabase.cpp
index 8dd4608..04dd4db 100644
--- a/clang/lib/Tooling/JSONCompilationDatabase.cpp
+++ b/clang/lib/Tooling/JSONCompilationDatabase.cpp
@@ -29,6 +29,7 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/StringSaver.h"
+#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"
#include <cassert>
@@ -169,8 +170,7 @@ class JSONCompilationDatabasePlugin : public CompilationDatabasePlugin {
JSONDatabasePath, ErrorMessage, JSONCommandLineSyntax::AutoDetect);
return Base ? inferTargetAndDriverMode(
inferMissingCompileCommands(expandResponseFiles(
- std::move(Base),
- llvm::vfs::createPhysicalFileSystem().release())))
+ std::move(Base), llvm::vfs::getRealFileSystem())))
: nullptr;
}
};