| // RUN: %target-swift-frontend -prespecialize-generic-metadata -target %module-target-future -I %S/Inputs/abi %s -emit-ir | %FileCheck %s -DINT=i%target-ptrsize |
| |
| // REQUIRES: VENDOR=apple || OS=linux-gnu |
| // UNSUPPORTED: CPU=i386 && OS=ios |
| // UNSUPPORTED: CPU=armv7 && OS=ios |
| // UNSUPPORTED: CPU=armv7s && OS=ios |
| |
| sil_stage canonical |
| import c_layout |
| |
| // 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: [[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-LABEL: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVMf" = 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-SAME: i64 0 } |
| |
| // CHECK-LABEL: @"\01l_type_metadata_table" = private constant |
| // CHECK-SAME: @"$sSo12AmazingColorVMn" |
| // CHECK-SAME: @"$sSo14HasNestedUnionVMn" |
| // CHECK-SAME: @"$sSo14HasNestedUnionV18__Unnamed_struct_sVMn" |
| |
| sil @test0 : $() -> () { |
| bb0: |
| %0 = metatype $@thick HasNestedUnion.Type |
| %1 = metatype $@thick AmazingColor.Type |
| |
| %ret = tuple () |
| return %ret : $() |
| } |
| |