-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
rustc_codegen_llvm: support 128-bit discriminants in debuginfo. #59520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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(); | ||
| } | ||
| 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 | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay, here is where we need someone who knows debuginfo (@michaelwoerister?). |
||
|
|
||
| // gdb-command:print vals | ||
| // gdb-check:$1 = (core::option::Option<repr_u128::Foo>, core::option::Option<repr_u128::Foo>) | ||
|
|
||
| // === LLDB TESTS ================================================================================== | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is GDB missing?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @eddyb Sorry for being late. I fixed test.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not seeing
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm, we cannot catch these now. This is a part of
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I really don't understand what's happening :/ |
||
|
|
||
| // 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() {()} | ||
Uh oh!
There was an error while loading. Please reload this page.