Skip to content

Commit

Permalink
Swift: turn off SIL verifications
Browse files Browse the repository at this point in the history
  • Loading branch information
redsun82 committed Oct 31, 2024
1 parent ce4273d commit 5a045be
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions swift/extractor/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,13 @@ static void processFrontendOptions(codeql::SwiftExtractorState& state,
}
}

static void turnOffSilVerifications(swift::SILOptions& options) {
options.VerifyAll = false;
options.VerifyExclusivity = false;
options.VerifyNone = true;
options.VerifySILOwnership = false;
}

codeql::TrapDomain invocationTrapDomain(codeql::SwiftExtractorState& state);

// This is part of the swiftFrontendTool interface, we hook into the
Expand All @@ -90,6 +97,7 @@ class Observer : public swift::FrontendObserver {
options.KeepASTContext = true;
lockOutputSwiftModuleTraps(state, options);
processFrontendOptions(state, options);
turnOffSilVerifications(invocation.getSILOptions());
}

void configuredCompiler(swift::CompilerInstance& instance) override {
Expand Down

0 comments on commit 5a045be

Please sign in to comment.