blob: 7d09ca544351178ba624433acda1766bab2ab78a [file] [log] [blame]
// RUN: %target-swift-frontend -assume-parsing-unqualified-ownership-sil -emit-ir %s | %FileCheck %s
sil_stage canonical
import Builtin
// Note: This test is trivial now that structs inside classes don't require dynamic
// metadata instantiation.
class Outer {
struct Inner {
}
}
sil_vtable Outer {}
sil @test0 : $@convention(thin) (@thick Outer.Inner.Type) -> (@thick Outer.Type) {
bb0(%0 : $@thick Outer.Inner.Type):
%1 = metatype $@thick Outer.Type
return %1 : $@thick Outer.Type
}
// CHECK-LABEL: define{{ | protected }}swiftcc %swift.type* @test0(%swift.type*)
// CHECK: [[T0:%.*]] = call %swift.type* @"$S12nested_types5OuterCMa"()
// CHECK-NEXT: ret %swift.type* [[T0]]
// CHECK-LABEL: define hidden %swift.type* @"$S12nested_types5OuterC5InnerVMa"()
// CHECK: ret %swift.type* bitcast {{.*}} @"$S12nested_types5OuterC5InnerVMf"