1 // compile-flags: -C no-prepopulate-passes
4 // min-system-llvm-version: 12.0
6 // See repr-transparent.rs
8 #![feature(transparent_unions)]
13 #[derive(Clone, Copy)]
15 pub struct BigS([u32; 16]);
18 pub struct TsBigS(BigS);
30 // CHECK: define void @test_BigS(%BigS* [[BIGS_RET_ATTRS1:.*]] sret(%BigS) [[BIGS_RET_ATTRS2:.*]], [8 x i64]
32 pub extern fn test_BigS(_: BigS) -> BigS { loop {} }
34 // CHECK: define void @test_TsBigS(%TsBigS* [[BIGS_RET_ATTRS1]] sret(%TsBigS) [[BIGS_RET_ATTRS2]], [8 x i64]
36 pub extern fn test_TsBigS(_: TsBigS) -> TsBigS { loop {} }
38 // CHECK: define void @test_TuBigS(%TuBigS* [[BIGS_RET_ATTRS1]] sret(%TuBigS) [[BIGS_RET_ATTRS2]], [8 x i64]
40 pub extern fn test_TuBigS(_: TuBigS) -> TuBigS { loop {} }
42 // CHECK: define void @test_TeBigS(%"TeBigS::Variant"* [[BIGS_RET_ATTRS1]] sret(%"TeBigS::Variant") [[BIGS_RET_ATTRS2]], [8 x i64]
44 pub extern fn test_TeBigS(_: TeBigS) -> TeBigS { loop {} }
47 #[derive(Clone, Copy)]
54 pub struct TsBigU(BigU);
66 // CHECK: define void @test_BigU(%BigU* [[BIGU_RET_ATTRS1:.*]] sret(%BigU) [[BIGU_RET_ATTRS2:.*]], [8 x i64]
68 pub extern fn test_BigU(_: BigU) -> BigU { loop {} }
70 // CHECK: define void @test_TsBigU(%TsBigU* [[BIGU_RET_ATTRS1]] sret(%TsBigU) [[BIGU_RET_ATTRS2]], [8 x i64]
72 pub extern fn test_TsBigU(_: TsBigU) -> TsBigU { loop {} }
74 // CHECK: define void @test_TuBigU(%TuBigU* [[BIGU_RET_ATTRS1]] sret(%TuBigU) [[BIGU_RET_ATTRS2]], [8 x i64]
76 pub extern fn test_TuBigU(_: TuBigU) -> TuBigU { loop {} }
78 // CHECK: define void @test_TeBigU(%"TeBigU::Variant"* [[BIGU_RET_ATTRS1]] sret(%"TeBigU::Variant") [[BIGU_RET_ATTRS2]], [8 x i64]
80 pub extern fn test_TeBigU(_: TeBigU) -> TeBigU { loop {} }