18llvm::cl::opt<std::string>
19 ExecutorName(
"executor", llvm::cl::desc(
"The name of the executor to use."),
20 llvm::cl::init(
"standalone"));
23 KVResults.push_back({Strings.save(Key), Strings.save(
Value)});
26std::vector<std::pair<llvm::StringRef, llvm::StringRef>>
32 llvm::function_ref<
void(StringRef Key, StringRef
Value)> Callback) {
33 for (
const auto &KV : KVResults) {
34 Callback(KV.first, KV.second);
52 Actions.emplace_back(std::move(Action), std::move(Adjuster));
60 const char *Overview) {
65 return OptionsParser.takeError();
66 for (
const auto &TEPlugin : ToolExecutorPluginRegistry::entries()) {
70 std::unique_ptr<ToolExecutorPlugin> Plugin(TEPlugin.instantiate());
72 Plugin->create(*OptionsParser);
74 return llvm::make_error<llvm::StringError>(
75 llvm::Twine(
"Failed to create '") + TEPlugin.getName() +
76 "': " + llvm::toString(Executor.takeError()) +
"\n",
77 llvm::inconvertibleErrorCode());
79 return std::move(*Executor);
81 return llvm::make_error<llvm::StringError>(
82 llvm::Twine(
"Executor \"") +
ExecutorName +
"\" is not registered.",
83 llvm::inconvertibleErrorCode());
90 const char *Overview) {
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.