Files
swift-mirror/test/SIL/verifier-undefined-function.sil
Erik Eckstein ceafe65500 SILVerifier: print a readable error message when referencing an undefined SIL function
This error was not printed because the verifier complained before the error handling was done.
2025-12-19 17:44:01 +01:00

17 lines
373 B
Plaintext

// RUN: not %target-sil-opt -o /dev/null %s 2>&1 | %FileCheck %s
// REQUIRES: asserts
sil_stage canonical
import Builtin
sil @undefined_function_ref : $@convention(thin) () -> () {
bb0:
// CHECK: :[[@LINE+1]]:21: error: use of undefined value 'undefined_function'
%0 = function_ref @undefined_function : $@convention(thin) () -> ()
%r = tuple ()
return %r
}