File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44#include " swift/extractor/trap/generated/TrapTags.h"
55#include " swift/extractor/infra/file/TargetFile.h"
66#include " swift/extractor/infra/file/Path.h"
7- #include " swift/extractor/trap/LinkDomain .h"
7+ #include " swift/extractor/infra/log/SwiftAssert .h"
88
99namespace fs = std::filesystem;
1010using namespace std ::string_literals;
1111
1212namespace codeql {
1313namespace {
14+
15+ Logger& logger () {
16+ static Logger ret{" invocation" };
17+ return ret;
18+ }
19+
1420std::string getModuleId (const std::string_view& name, const std::string_view& hash) {
1521 auto ret = " module:" s;
1622 ret += name;
@@ -108,10 +114,8 @@ void replaceMergedModulesImplementation(const SwiftExtractorState& state,
108114 fs::copy (getTrapPath (state, mergeTarget, TrapType::linkage),
109115 getTrapPath (state, mergedPartTarget, TrapType::linkage),
110116 fs::copy_options::overwrite_existing, ec);
111- if (ec) {
112- std::cerr << " unable to replace trap implementation id for merged module '" << name << " ' ("
113- << ec.message () << " )" ;
114- }
117+ CODEQL_ASSERT (!ec, " Unable to replace trap implementation id for merged module '{}' ({})" , name,
118+ ec);
115119}
116120
117121void emitModuleObjectDependencies (const SwiftExtractorState& state,
You can’t perform that action at this time.
0 commit comments