summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Tooling/StandaloneExecution.h1
-rw-r--r--clang/lib/Tooling/StandaloneExecution.cpp8
2 files changed, 6 insertions, 3 deletions
diff --git a/clang/include/clang/Tooling/StandaloneExecution.h b/clang/include/clang/Tooling/StandaloneExecution.h
index 7d1d0d68a40..572330e4cc2 100644
--- a/clang/include/clang/Tooling/StandaloneExecution.h
+++ b/clang/include/clang/Tooling/StandaloneExecution.h
@@ -37,6 +37,7 @@ public:
StandaloneToolExecutor(
const CompilationDatabase &Compilations,
llvm::ArrayRef<std::string> SourcePaths,
+ IntrusiveRefCntPtr<vfs::FileSystem> BaseFS = vfs::getRealFileSystem(),
std::shared_ptr<PCHContainerOperations> PCHContainerOps =
std::make_shared<PCHContainerOperations>());
diff --git a/clang/lib/Tooling/StandaloneExecution.cpp b/clang/lib/Tooling/StandaloneExecution.cpp
index eea8e39d134..7312baf9dc7 100644
--- a/clang/lib/Tooling/StandaloneExecution.cpp
+++ b/clang/lib/Tooling/StandaloneExecution.cpp
@@ -30,9 +30,11 @@ static ArgumentsAdjuster getDefaultArgumentsAdjusters() {
StandaloneToolExecutor::StandaloneToolExecutor(
const CompilationDatabase &Compilations,
llvm::ArrayRef<std::string> SourcePaths,
+ IntrusiveRefCntPtr<vfs::FileSystem> BaseFS,
std::shared_ptr<PCHContainerOperations> PCHContainerOps)
- : Tool(Compilations, SourcePaths), Context(&Results),
- ArgsAdjuster(getDefaultArgumentsAdjusters()) {
+ : Tool(Compilations, SourcePaths, std::move(PCHContainerOps),
+ std::move(BaseFS)),
+ Context(&Results), ArgsAdjuster(getDefaultArgumentsAdjusters()) {
// Use self-defined default argument adjusters instead of the default
// adjusters that come with the old `ClangTool`.
Tool.clearArgumentsAdjusters();
@@ -43,7 +45,7 @@ StandaloneToolExecutor::StandaloneToolExecutor(
std::shared_ptr<PCHContainerOperations> PCHContainerOps)
: OptionsParser(std::move(Options)),
Tool(OptionsParser->getCompilations(), OptionsParser->getSourcePathList(),
- PCHContainerOps),
+ std::move(PCHContainerOps)),
Context(&Results), ArgsAdjuster(getDefaultArgumentsAdjusters()) {
Tool.clearArgumentsAdjusters();
}
OpenPOWER on IntegriCloud