Files
swift-mirror/test/SIL/Parser/global_codegen_model.sil
T
Doug Gregor 92dcbd17c6 [SIL] Explicitly keep the code generation model in SILGlobalVariable
Just like we do with SILFunction, allow a code generation model to be
specified on a SILGlobalVariable and maintain that through the printed
and serialized forms.
2026-05-20 08:35:22 -07:00

26 lines
832 B
Plaintext

// RUN: %target-sil-opt -enable-sil-verify-all %s | %FileCheck %s
// Check that `[export_interface]` and `[export_implementation]` round-trip
// through the SIL textual parser and printer for `sil_global`.
sil_stage canonical
import Builtin
import Swift
import SwiftShims
public var exportedInterface: Int
public var exportedImplementation: Int
public var implicitDefault: Int
// CHECK: sil_global [export_interface] @$s8sil_vars17exportedInterfaceSivp : $Int
sil_global [export_interface] @$s8sil_vars17exportedInterfaceSivp : $Int
// CHECK: sil_global [export_implementation] @$s8sil_vars22exportedImplementationSivp : $Int
sil_global [export_implementation] @$s8sil_vars22exportedImplementationSivp : $Int
// CHECK: sil_global @$s8sil_vars15implicitDefaultSivp : $Int
sil_global @$s8sil_vars15implicitDefaultSivp : $Int