1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
// compile-flags: -O #![crate_type="lib"] #[repr(i8)] pub enum Type { Type1 = 0, Type2 = 1 } // CHECK: define{{( dso_local)?}} noundef signext i8 @test() #[no_mangle] pub extern "C" fn test() -> Type { Type::Type1 }