25#ifdef ENABLE_BACKWARD_CPP
26#define BACKWARD_HAS_DW 1
27#define BACKWARD_HAS_LIBUNWIND 1
28#include <backward-cpp/backward.hpp>
31#include <cli11/CLI11.hpp>
32#include <spdlog/spdlog.h>
36#ifdef ENABLE_BACKWARD_CPP
38backward::SignalHandling sh;
44int main(
int argc,
const char *argv[])
51 if (res == cli::cli_flow_t::kExit)
54 if (res == cli::cli_flow_t::kError)
59 spdlog::set_error_handler([](
const std::string & ) {
68 const auto compilation_database_files = db->getAllFiles();
70 std::map<std::string ,
71 std::vector<std::string> >
72 translation_units_map;
79 translation_units_map);
94 "ERROR: Failed to load compilation database from {} due to: {}",
98 LOG_ERROR(
"Failed to load compilation database from {} due to: {}",
106 "ERROR: Querying provided compiler driver {} did not provide "
108 "paths, please make sure the path is correct and that your "
109 "compiler is GCC-compatible: {}",
114 "Querying provided compiler driver {} did not provide any "
115 "paths, please make sure the path is correct and that your "
116 "compiler is GCC-compatible: {}",
123 fmt::println(
"ERROR: {}", e.what());
128 catch (std::exception &e) {
130 fmt::println(
"ERROR: {}", e.what());