| ... | @@ -1950,7 +1950,6 @@ pub const Object = struct { | ... | @@ -1950,7 +1950,6 @@ pub const Object = struct { |
| 1950 | }, | 1950 | }, |
| 1951 | .Int => { | 1951 | .Int => { |
| 1952 | const info = ty.intInfo(zcu); | 1952 | const info = ty.intInfo(zcu); |
| 1953 | assert(info.bits != 0); | | |
| 1954 | const int_name = try o.allocTypeName(ty); | 1953 | const int_name = try o.allocTypeName(ty); |
| 1955 | defer gpa.free(int_name); | 1954 | defer gpa.free(int_name); |
| 1956 | const builder_name = try o.builder.metadataString(int_name); | 1955 | const builder_name = try o.builder.metadataString(int_name); |
| ... | @@ -2132,7 +2131,6 @@ pub const Object = struct { | ... | @@ -2132,7 +2131,6 @@ pub const Object = struct { |
| 2132 | const debug_elem_type = switch (elem_ty.zigTypeTag(zcu)) { | 2131 | const debug_elem_type = switch (elem_ty.zigTypeTag(zcu)) { |
| 2133 | .Int => blk: { | 2132 | .Int => blk: { |
| 2134 | const info = elem_ty.intInfo(zcu); | 2133 | const info = elem_ty.intInfo(zcu); |
| 2135 | assert(info.bits != 0); | | |
| 2136 | const vec_name = try o.allocTypeName(ty); | 2134 | const vec_name = try o.allocTypeName(ty); |
| 2137 | defer gpa.free(vec_name); | 2135 | defer gpa.free(vec_name); |
| 2138 | const builder_name = try o.builder.metadataString(vec_name); | 2136 | const builder_name = try o.builder.metadataString(vec_name); |
| ... | @@ -2446,8 +2444,6 @@ pub const Object = struct { | ... | @@ -2446,8 +2444,6 @@ pub const Object = struct { |
| 2446 | if (decl.kind != .named) continue; | 2444 | if (decl.kind != .named) continue; |
| 2447 | if (decl.analysis != .complete) continue; | 2445 | if (decl.analysis != .complete) continue; |
| 2448 | | 2446 | |
| 2449 | const decl_line = decl.typeSrcLine(zcu) + 1; | | |
| 2450 | | | |
| 2451 | if (decl.val.typeOf(zcu).ip_index == .type_type) { | 2447 | if (decl.val.typeOf(zcu).ip_index == .type_type) { |
| 2452 | const nested_type = decl.val.toType(); | 2448 | const nested_type = decl.val.toType(); |
| 2453 | // If this decl is the owner of the type, it will | 2449 | // If this decl is the owner of the type, it will |
| ... | @@ -2457,11 +2453,20 @@ pub const Object = struct { | ... | @@ -2457,11 +2453,20 @@ pub const Object = struct { |
| 2457 | if (owner == decl_id) continue; | 2453 | if (owner == decl_id) continue; |
| 2458 | } | 2454 | } |
| 2459 | | 2455 | |
| | 2456 | switch (nested_type.zigTypeTag(zcu)) { |
| | 2457 | // We still may want these for a Zig expression |
| | 2458 | // evaluator in debuggers, but for now they are |
| | 2459 | // completely useless. |
| | 2460 | .ComptimeInt, .ComptimeFloat, |
| | 2461 | .Type, .Undefined, .Null, .EnumLiteral => continue, |
| | 2462 | else => {}, |
| | 2463 | } |
| | 2464 | |
| 2460 | fields.appendAssumeCapacity(try o.builder.debugTypedef( | 2465 | fields.appendAssumeCapacity(try o.builder.debugTypedef( |
| 2461 | try o.builder.metadataString(decl_name), | 2466 | try o.builder.metadataString(decl_name), |
| 2462 | try o.getDebugFile(namespace.fileScope(zcu)), | 2467 | try o.getDebugFile(namespace.fileScope(zcu)), |
| 2463 | fwd_ref, | 2468 | fwd_ref, |
| 2464 | decl_line, | 2469 | 0, |
| 2465 | try o.lowerDebugType(nested_type, false), | 2470 | try o.lowerDebugType(nested_type, false), |
| 2466 | 0, // Align | 2471 | 0, // Align |
| 2467 | )); | 2472 | )); |
| ... | @@ -2470,7 +2475,7 @@ pub const Object = struct { | ... | @@ -2470,7 +2475,7 @@ pub const Object = struct { |
| 2470 | try o.builder.metadataString(decl_name), | 2475 | try o.builder.metadataString(decl_name), |
| 2471 | try o.getDebugFile(namespace.fileScope(zcu)), | 2476 | try o.getDebugFile(namespace.fileScope(zcu)), |
| 2472 | fwd_ref, | 2477 | fwd_ref, |
| 2473 | decl_line, | 2478 | 0, |
| 2474 | try o.lowerDebugType(Type.fromInterned(v.ty), false), | 2479 | try o.lowerDebugType(Type.fromInterned(v.ty), false), |
| 2475 | )); | 2480 | )); |
| 2476 | } | 2481 | } |