Summary:
Used in clangd's symbol builder to optimize for the common
shared-memory executor case.
Reviewers: ioeric
Reviewed By: ioeric
Subscribers: kadircet, cfe-commits
Differential Revision: https://reviews.llvm.org/D51164
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@340599
91177308-0d34-0410-b5e6-
96231b3b80d8
StringRef getExecutorName() const override { return ExecutorName; }
+ bool isSingleProcess() const override { return true; }
+
using ToolExecutor::execute;
llvm::Error
/// Returns the name of a specific executor.
virtual StringRef getExecutorName() const = 0;
+ /// Should return true iff executor runs all actions in a single process.
+ /// Clients can use this signal to find out if they can collect results
+ /// in-memory (e.g. to avoid serialization costs of using ToolResults).
+ /// The single-process executors can still run multiple threads, but all
+ /// executions are guaranteed to share the same memory.
+ virtual bool isSingleProcess() const = 0;
+
/// Executes each action with a corresponding arguments adjuster.
virtual llvm::Error
execute(llvm::ArrayRef<
StringRef getExecutorName() const override { return ExecutorName; }
+ bool isSingleProcess() const override { return true; }
+
using ToolExecutor::execute;
llvm::Error
StringRef getExecutorName() const override { return ExecutorName; }
+ bool isSingleProcess() const override { return true; }
+
llvm::Error
execute(llvm::ArrayRef<std::pair<std::unique_ptr<FrontendActionFactory>,
ArgumentsAdjuster>>) override {