1 // Require LLVM with DW_TAG_variant_part and a gdb that can read it.
2 // min-system-llvm-version: 8.0
3 // min-gdb-version: 8.2
5 // compile-flags:-g -Z thinlto
7 // === GDB TESTS ===================================================================================
11 // gdb-command:print *abc
12 // gdbr-check:$1 = enum_thinlto::ABC::TheA{x: 0, y: 8970181431921507452}
14 // === LLDB TESTS ==================================================================================
18 // lldb-command:print *abc
19 // lldbg-check:(enum_thinlto::ABC) $0 = ABC { }
21 #![allow(unused_variables)]
22 #![feature(omit_gdb_pretty_printer_section)]
23 #![omit_gdb_pretty_printer_section]
25 // The first element is to ensure proper alignment, irrespective of the machines word size. Since
26 // the size of the discriminant value is machine dependent, this has be taken into account when
27 // datatype layout should be predictable as in this case.
30 TheA { x: i64, y: i64 },
35 let abc = ABC::TheA { x: 0, y: 0x7c7c_7c7c_7c7c_7c7c };
43 println!("{:?}", abc);