aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/codegen/llvm.zig5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig
index 2a5a187e0d..6273ce0942 100644
--- a/src/codegen/llvm.zig
+++ b/src/codegen/llvm.zig
@@ -2598,7 +2598,10 @@ pub const Object = struct {
defer gpa.free(name);
const union_type = ip.loadUnionType(ty.toIntern());
- if (!union_type.haveFieldTypes(ip) or !ty.hasRuntimeBitsIgnoreComptime(mod)) {
+ if (!union_type.haveFieldTypes(ip) or
+ !ty.hasRuntimeBitsIgnoreComptime(mod) or
+ !union_type.haveLayout(ip))
+ {
const debug_union_type = try o.makeEmptyNamespaceDebugType(owner_decl_index);
try o.debug_type_map.put(gpa, ty, debug_union_type);
return debug_union_type;