Fix debuginfo for unsized struct members
The member was given the size of a fat pointer, which caused
llvm to emit DWARF attributes for a 128-bit bitfield.
MemberDescription {
name: name,
- llvm_type: type_of::type_of(cx, fty),
+ llvm_type: type_of::in_memory_type_of(cx, fty),
type_metadata: type_metadata(cx, fty, self.span),
offset: offset,
flags: DIFlags::FlagZero,
llvm::LLVMRustDIBuilderCreateEnumerator(
DIB(cx),
name.as_ptr(),
- v.disr_val.to_u64_unchecked())
+ // FIXME: what if enumeration has i128 discriminant?
+ v.disr_val.to_u128_unchecked() as u64)
}
})
.collect();