mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Swift: fix log compilation
This commit is contained in:
@@ -224,18 +224,18 @@ void codeql::extractSwiftFiles(SwiftExtractorState& state, swift::CompilerInstan
|
||||
}
|
||||
isFromSourceFile = true;
|
||||
if (inputFiles.count(sourceFile->getFilename().str()) == 0) {
|
||||
LOG_DEBUG("skipping module {} from file {}, not in input files", module->getName(),
|
||||
LOG_DEBUG("skipping module {} from file {}, not in input files", module->getName().get(),
|
||||
sourceFile->getFilename());
|
||||
continue;
|
||||
}
|
||||
LOG_DEBUG("extracting module {} from input file {}", module->getName(),
|
||||
LOG_DEBUG("extracting module {} from input file {}", module->getName().get(),
|
||||
sourceFile->getFilename());
|
||||
archiveFile(state.configuration, *sourceFile);
|
||||
encounteredModules =
|
||||
extractDeclarations(state, compiler, *module, sourceFile, /*lazy declaration*/ nullptr);
|
||||
}
|
||||
if (!isFromSourceFile) {
|
||||
LOG_DEBUG("extracting module {} from non-source file", module->getName());
|
||||
LOG_DEBUG("extracting module {} from non-source file", module->getName().get());
|
||||
encounteredModules = extractDeclarations(state, compiler, *module, /*source file*/ nullptr,
|
||||
/*lazy declaration*/ nullptr);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ class Observer : public swift::FrontendObserver {
|
||||
explicit Observer(const codeql::SwiftExtractorConfiguration& config) : state{config} {}
|
||||
|
||||
void parsedArgs(swift::CompilerInvocation& invocation) override {
|
||||
LOG_DEBUG("{}(...)", __func__);
|
||||
LOG_DEBUG("{}()", __func__);
|
||||
auto& options = invocation.getFrontendOptions();
|
||||
options.KeepASTContext = true;
|
||||
lockOutputSwiftModuleTraps(state, options);
|
||||
@@ -102,14 +102,14 @@ class Observer : public swift::FrontendObserver {
|
||||
}
|
||||
|
||||
void configuredCompiler(swift::CompilerInstance& instance) override {
|
||||
LOG_DEBUG("{}(...)", __func__);
|
||||
LOG_DEBUG("{}()", __func__);
|
||||
// remove default consumers to avoid double messaging
|
||||
instance.getDiags().takeConsumers();
|
||||
instance.addDiagnosticConsumer(&diagConsumer);
|
||||
}
|
||||
|
||||
void performedCompilation(swift::CompilerInstance& compiler) override {
|
||||
LOG_DEBUG("{}(...)", __func__);
|
||||
LOG_DEBUG("{}()", __func__);
|
||||
codeql::extractSwiftFiles(state, compiler);
|
||||
codeql::extractSwiftInvocation(state, compiler, invocationTrap);
|
||||
codeql::extractExtractLazyDeclarations(state, compiler);
|
||||
|
||||
Reference in New Issue
Block a user