refactor: simplify CompilationDatabase, extract ArgumentParser, remove pimpl (#371)

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ykiko
2026-03-27 13:15:49 +08:00
committed by GitHub
parent 498c975042
commit 46ba1e4db6
19 changed files with 1724 additions and 1824 deletions

View File

@@ -4,6 +4,7 @@
#include <string>
#include <vector>
#include "command/argument_parser.h"
#include "eventide/reflection/enum.h"
#include "support/filesystem.h"
#include "support/logging.h"
@@ -62,19 +63,6 @@ namespace clice::toolchain {
namespace {
std::string print_argv(llvm::ArrayRef<const char*> args) {
std::string s = "[";
if(!args.empty()) {
s += args.consume_front();
for(auto arg: args) {
s += " ";
s += arg;
}
}
s += "]";
return s;
}
std::optional<std::string> execute_command(llvm::ArrayRef<const char*> arguments,
bool capture_stdout = false) {
LOG_INFO("Execute command: {}", print_argv(arguments));