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 cfeceb4 commit cb48b5b
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 cb48b5b

Please sign in to comment.