Skip to content

Commit

Permalink
conv:tollvm: Fix union data layout analysis access.
Browse files Browse the repository at this point in the history
  • Loading branch information
xlauko committed Oct 17, 2024
1 parent 4a85174 commit 76c66f9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,8 @@ namespace vast::conv::tc {
}

if (auto union_decl = mlir::dyn_cast< hl::UnionDeclOp >(*def)) {
auto dl = this->getDataLayoutAnalysis()->getAtOrAbove(union_decl);
auto dla = mlir::DataLayoutAnalysis(union_decl);
auto dl = dla.getAtOrAbove(union_decl);
auto fields = union_lowering{ dl, union_decl }.compute_lowering().fields;
return { union_lowering::final_fields(std::move(fields)) };
} else {
Expand Down

0 comments on commit 76c66f9

Please sign in to comment.