Files
swift-mirror/test/SILOptimizer/cyclic_entry.sil
Michael Gottesman c876c1ee88 [sil-verifier] Split SILVerifier verificationFailure into separate functions for Instructions, Arguments, and add a variant for Values.
This also required me to change how we handled which instruction/argument we
emit an error about in the verifier. Previously we were using two global
variables that we made nullptr to control which thing we emitted an error about.
This was unnecessary. Instead I added a little helper struct that internally
controls what we will emit an error about and an external "guard" RAII struct
that makes sure we push/pop the instruction/argument we are erroring upon
correctly.
2025-11-21 11:21:15 -08:00

18 lines
486 B
Plaintext

// RUN: %empty-directory(%t)
// RUN: %target-sil-opt -sil-verify-all=false -enable-sil-verify-all=false -emit-sorted-sil -verify-continue-on-failure %s 2>&1 | %FileCheck %s
// REQUIRES: asserts
// The test in this file is meant to fail the verifier, as the entry block of a SIL
// function can't have a predecessor.
import Builtin
import Swift
// CHECK: SIL verification failed: entry block cannot have predecessors
sil @patatino : $@convention(thin) () -> Never {
bb0:
br bb0
}