blob: da66e54ac0566d28c728c29d184afaccfb250414 [file] [log] [blame]
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -I %S/Inputs/abi %s -emit-ir | %FileCheck %s
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 global
// CHECK-SAME: [[INT:i[0-9]+]] sub ([[INT]] ptrtoint
// CHECK-SAME: [[INT]] 0,
// CHECK-SAME: @"$SSo14HasNestedUnionV18__Unnamed_struct_sVWV"
// CHECK-SAME: [[INT]] 1,
// CHECK-SAME: @"$SSo14HasNestedUnionV18__Unnamed_struct_sVMn"
// CHECK-SAME: [[INT]] 0,
// CHECK-SAME: [[INT]] 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 %swift.type* @"$SSo14HasNestedUnionVMa
// CHECK: call %swift.type* @swift_getForeignTypeMetadata{{.*}}$SSo14HasNestedUnionVN
// CHECK-LABEL: define linkonce_odr hidden %swift.type* @"$SSo12AmazingColorVMa"()
// CHECK: call %swift.type* @swift_getForeignTypeMetadata{{.*}}@"$SSo12AmazingColorVN"