blob: 1f41e5ed13e8e96b96027144bb91b5ac8eabf6ec [file] [log] [blame]
// RUN: %target-swift-frontend -I %S/Inputs/abi %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize
sil_stage canonical
import c_layout
// CHECK: [[HAS_NESTED_UNION_NAME:@.*]] = private constant [15 x i8] c"HasNestedUnion\00"
// CHECK-LABEL: @"$sSo14HasNestedUnionVMn" = linkonce_odr hidden constant
// CHECK-SAME: [[HAS_NESTED_UNION_NAME]]
// CHECK-SAME: @"$sSo14HasNestedUnionVMa"
// CHECK: [[AMAZING_COLOR_NAME:@.*]] = private constant [13 x i8] c"AmazingColor\00"
// CHECK-LABEL: @"$sSo12AmazingColorVMn" = linkonce_odr hidden constant
// CHECK-SAME: [[AMAZING_COLOR_NAME]]
// CHECK-SAME: @"$sSo12AmazingColorVMa"
// CHECK-LABEL: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVN" = linkonce_odr hidden constant
// CHECK-SAME: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVWV"
// CHECK-SAME: [[INT]] 512,
// CHECK-SAME: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVMn"
// CHECK-SAME: i32 0,
// CHECK-SAME: i32 4 }
// CHECK-LABEL: @"\01l_type_metadata_table" = private constant
// CHECK-SAME: @"$sSo14HasNestedUnionVMn"
// CHECK-SAME: @"$sSo12AmazingColorVMn"
// CHECK-SAME: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVMn"
sil @test0 : $() -> () {
bb0:
%0 = metatype $@thick HasNestedUnion.Type
%1 = metatype $@thick AmazingColor.Type
%ret = tuple ()
return %ret : $()
}
// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$sSo14HasNestedUnionVMa"(
// CHECK: call swiftcc %swift.metadata_response @swift_getForeignTypeMetadata([[INT]] %0, {{.*}}$sSo14HasNestedUnionVN
// CHECK-LABEL: define linkonce_odr hidden swiftcc %swift.metadata_response @"$sSo12AmazingColorVMa"(
// CHECK: call swiftcc %swift.metadata_response @swift_getForeignTypeMetadata([[INT]] %0, {{.*}}@"$sSo12AmazingColorVN"