-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support 128-bit discriminants in debuginfo
- Loading branch information
Showing
5 changed files
with
68 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// ignore-tidy-linelength | ||
// ignore-windows | ||
// min-system-llvm-version 8.0 | ||
|
||
// compile-flags: -g -C no-prepopulate-passes | ||
|
||
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "None",{{.*}}extraData: i128 18446745000000000124{{[,)].*}} | ||
|
||
#![feature(repr128)] | ||
|
||
#[repr(u128)] | ||
pub enum Foo { | ||
Lo, | ||
Hi = 1 << 64, | ||
Bar = 18_446_745_000_000_000_123, | ||
} | ||
|
||
pub fn foo() -> Option<Foo> { | ||
None | ||
} | ||
|
||
fn main() { | ||
let roa = foo(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// ignore-windows | ||
// ignore-tidy-linelength | ||
// min-system-llvm-version 8.0 | ||
|
||
// compile-flags: -g -C no-prepopulate-passes | ||
|
||
// === GDB TESTS =================================================================================== | ||
|
||
// gdb-command: run | ||
|
||
// gdb-command:print vals | ||
// gdb-check:$1 = (core::option::Option<repr_u128::Foo>, core::option::Option<repr_u128::Foo>) | ||
|
||
// === LLDB TESTS ================================================================================== | ||
|
||
// lldb-command:run | ||
|
||
// lldb-command:print vals | ||
// lldbg-check:[...]$0 = (Option<repr_u128::Foo> { }, Option<repr_u128::Foo> { }) | ||
// lldbr-check:((core::option::Option<repr_u128::Foo>, core::option::Option<repr_u128::Foo>)) $0 = (Option<repr_u128::Foo> { }, Option<repr_u128::Foo> { }) | ||
|
||
#![feature(repr128)] | ||
|
||
#[repr(u128)] | ||
pub enum Foo { | ||
Lo, | ||
Hi = 1 << 64, | ||
Bar = 18_446_745_000_000_000_123, | ||
} | ||
|
||
fn main() { | ||
let vals = (Some(Foo::Lo), None::<Foo>); | ||
|
||
zzz(); // #break | ||
} | ||
|
||
fn zzz() {()} |