From 465be8ddd2044ebf3b082ec93e4dea54b0b3e805 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Wed, 26 Jun 2024 13:10:36 -0400 Subject: [PATCH] xo-jit: drop isPacked=true when creating struct types --- src/jit/MachPipeline.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/jit/MachPipeline.cpp b/src/jit/MachPipeline.cpp index 5228cc09..e2a69e7c 100644 --- a/src/jit/MachPipeline.cpp +++ b/src/jit/MachPipeline.cpp @@ -247,9 +247,6 @@ namespace xo { std::string struct_name = std::string(struct_td->short_name()); /* structs with names: within an llvmcontext, must be unique - * - * If we don't set isPacked, then padding will be chosen based on DataLayout, - * which might C++ compiler's padding, but no guarantees. * * We can however compare the offsets recorded in xo::reflect with * offsets chosen by llvm, *once we've created the llvm type* @@ -268,7 +265,7 @@ namespace xo { = llvm::StructType::create(llvm_cx_ref, llvm_membertype_v, llvm::StringRef(struct_name), - true /*isPacked*/); + false /*!isPacked*/); /* TODO: inspect (how) offsets that llvm is using * we need them to match what C++ chose