-
Notifications
You must be signed in to change notification settings - Fork 13k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #59520 - JohnTitor:add-assert, r=eddyb
rustc_codegen_llvm: support 128-bit discriminants in debuginfo. CC: #59509 > Alternatively, if LLVM and DWARF support it, we should encode the 128-bit discriminant If we should fix like this issue comment, I'll do. r? @eddyb
- Loading branch information
Showing
3 changed files
with
59 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// ignore-windows | ||
// ignore-tidy-linelength | ||
//min-system-llvm-version 8.0 | ||
|
||
//compile-flags: -g -C no-prepopulate-passes | ||
#![feature(repr128)] | ||
|
||
#[repr(u128)] | ||
pub enum Foo { | ||
Lo, | ||
Hi = 1 << 64, | ||
Bar = 18_446_745_000_000_000_123, | ||
} | ||
|
||
// CHECK: {{.*}}DIDerivedType{{.*}}tag: DW_TAG_member,{{.*}}name: "None",{{.*}}extraData:18446745000000000124 | ||
pub fn foo() -> Option<Foo> { | ||
None | ||
} | ||
|
||
fn main() {} |
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,34 @@ | ||
// 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 | ||
// gdbg-check:$1 = (Some(Foo::Lo), None::<Foo>) | ||
// gdbr-check:$1 = repr_u128::Foo::(std::option::Option<Foo>, std::option::Option<Foo>) | ||
|
||
// === LLDB TESTS ================================================================================== | ||
|
||
// lldb-command:run | ||
|
||
// lldb-command:print vals | ||
// lldbg-check:[...]$0 = (Some(Foo::Lo), None::<Foo>) | ||
// lldbr-check:(repr_u128::Foo) vals = repr_u128::Foo::(std::option::Option<Foo>, std::option::Option<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>); | ||
} |