20llvm::cl::opt<std::string>
21 ExecutorName(
"executor", llvm::cl::desc(
"The name of the executor to use."),
22 llvm::cl::init(
"standalone"));
25 KVResults.push_back({Strings.save(Key), Strings.save(
Value)});
28std::vector<std::pair<llvm::StringRef, llvm::StringRef>>
34 llvm::function_ref<
void(StringRef Key, StringRef
Value)> Callback) {
35 for (
const auto &KV : KVResults) {
36 Callback(KV.first, KV.second);
54 Actions.emplace_back(std::move(Action), std::move(Adjuster));
61 llvm::cl::OptionCategory &Category,
62 const char *Overview) {
67 return OptionsParser.takeError();
68 for (
const auto &TEPlugin : ToolExecutorPluginRegistry::entries()) {
72 std::unique_ptr<ToolExecutorPlugin> Plugin(TEPlugin.instantiate());
74 Plugin->create(*OptionsParser);
76 return llvm::make_error<llvm::StringError>(
77 llvm::Twine(
"Failed to create '") + TEPlugin.getName() +
78 "': " + llvm::toString(Executor.takeError()) +
"\n",
79 llvm::inconvertibleErrorCode());
81 return std::move(*Executor);
83 return llvm::make_error<llvm::StringError>(
84 llvm::Twine(
"Executor \"") +
ExecutorName +
"\" is not registered.",
85 llvm::inconvertibleErrorCode());
91 llvm::cl::OptionCategory &Category,
92 const char *Overview) {
101[[maybe_unused]]
static int StandaloneToolExecutorAnchorDest =
103[[maybe_unused]]
static int AllTUsToolExecutorAnchorDest =
LLVM_INSTANTIATE_REGISTRY_EX(CLANG_ABI_EXPORT, clang::tooling::ToolExecutorPluginRegistry) namespace clang
void reportResult(StringRef Key, StringRef Value)
Adds a KV pair to the result container of this execution.
The JSON file list parser is used to communicate input to InstallAPI.