45{
47
48 try {
50
51 if (res == cli::cli_flow_t::kExit)
52 return 0;
53
54 if (res == cli::cli_flow_t::kError)
55 return 1;
56
57#if !defined(NDEBUG)
58
59 spdlog::set_error_handler([](const std::string & ) {
60 assert(0 == 1);
61 });
62#endif
63
64 const auto db =
67
68 const auto compilation_database_files = db->getAllFiles();
69
70 std::map<std::string ,
71 std::vector<std::string> >
72 translation_units_map;
73
74
75
76
79
81
82
83
84 llvm::errs().close();
85 }
86
89 }
92 fmt::println(
93 "ERROR: Failed to load compilation database from {} due to: {}",
95 }
96 else {
97 LOG_ERROR(
"Failed to load compilation database from {} due to: {}",
99 }
100 return 1;
101 }
104 fmt::println(
105 "ERROR: Querying provided compiler driver {} did not provide "
106 "any "
107 "paths, please make sure the path is correct and that your "
108 "compiler is GCC-compatible: {}",
110 }
111 else {
113 "Querying provided compiler driver {} did not provide any "
114 "paths, please make sure the path is correct and that your "
115 "compiler is GCC-compatible: {}",
117 }
118 return 1;
119 }
122 fmt::println(
"ERROR: {}", e.
what());
123 else
125 return 1;
126 }
127 catch (std::exception &e) {
129 fmt::println("ERROR: {}", e.what());
130 else
132 return 1;
133 }
134
135 return 0;
136}