swift
60114a2e - Guard SARIF consumer creation with SWIFT_BUILD_SARIF

Commit
39 days ago
Guard SARIF consumer creation with SWIFT_BUILD_SARIF Declare and define `sarif_diagnostics::createConsumer` only when `SWIFT_BUILD_SARIF` is set, and guard the `SARIF` case in `DiagnosticHelper` at the call site. Argument parsing already rejects '-serialize-diagnostics=sarif' in such builds with error_serialize_diagnostics_sarif_unsupported_build, so the case cannot be reached. It aborts with ABORT rather than llvm_unreachable so that breaking that guarantee crashes clearly in every build.
Author
Parents
Loading