llvm: handle namespace like packed structs

Closes #13159
Closes #13188
This commit is contained in:
Veikka Tuominen
2022-10-24 14:46:14 +03:00
parent dd437ae399
commit 78a7bb108a
3 changed files with 16 additions and 1 deletions

View File

@@ -1916,7 +1916,7 @@ pub const Object = struct {
if (ty.castTag(.@"struct")) |payload| {
const struct_obj = payload.data;
if (struct_obj.layout == .Packed) {
if (struct_obj.layout == .Packed and struct_obj.haveFieldTypes()) {
const info = struct_obj.backing_int_ty.intInfo(target);
const dwarf_encoding: c_uint = switch (info.signedness) {
.signed => DW.ATE.signed,