[Lldb-commits] [lldb] Use `llvm::APInt` for `VariantMember` Discriminants (PR #188487)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Apr 14 01:42:09 PDT 2026
Nerixyz wrote:
> I'm not super familiar with LLDB's testing infrastructure
Tried hacking around to get a reproducer:
```rust
#![no_std]
#![no_main]
#[allow(unused)]
#[repr(u128)]
enum BigDiscr {
Value(u64),
None = 0x16151413121110090807060504030201,
}
fn use_it(_: &BigDiscr) {}
#[panic_handler]
fn panic(_info: &core::panic::PanicInfo) -> ! {
loop {}
}
#[no_mangle]
extern "C" fn main() {
let none = BigDiscr::None;
let some = BigDiscr::Value(31);
use_it(&none);
use_it(&some);
}
```
Compiled with `rustc main.rs -g -C panic=abort -C link-arg=-nostdlib` on x86_64 Linux yields a 5.8K object file and 12K obj2yaml'd file.
https://github.com/llvm/llvm-project/pull/188487
More information about the lldb-commits
mailing list