mirror of
https://github.com/apple/swift.git
synced 2026-02-27 18:26:24 +01:00
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.
18 lines
486 B
Plaintext
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
|
|
}
|