Skip to content

Commit

Permalink
llvm: also generate metadata for extern global variables
Browse files Browse the repository at this point in the history
Signed-off-by: Tw <tw19881113@gmail.com>
  • Loading branch information
tw4452852 authored and Vexu committed May 22, 2023
1 parent 5af89b3 commit a0652fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/llvm.zig
Original file line number Diff line number Diff line change
Expand Up @@ -2560,7 +2560,7 @@ pub const DeclGen = struct {
);

try dg.object.di_map.put(dg.gpa, dg.decl, di_global.getVariable().toNode());
if (!is_internal_linkage) global.attachMetaData(di_global);
if (!is_internal_linkage or decl.isExtern()) global.attachMetaData(di_global);
}
}
}
Expand Down

0 comments on commit a0652fb

Please sign in to comment.