From cb48b5b18bc11e734d2a811f08ed02ae1ec3d8fb Mon Sep 17 00:00:00 2001 From: xlauko Date: Thu, 17 Oct 2024 21:07:22 +0200 Subject: [PATCH] conv:tollvm: Fix union data layout analysis access. --- include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp b/include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp index de59848a98..47f592706a 100644 --- a/include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp +++ b/include/vast/Conversion/TypeConverters/LLVMTypeConverter.hpp @@ -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 {