Skip to content

Commit 20d6b84

Browse files
committed
LLVMTypes: Add missing padding to ValueData struct
1 parent cd86c35 commit 20d6b84

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/dev/engine/internal/llvm/llvmtypes.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ llvm::StructType *LLVMTypes::createValueDataType(llvm::IRBuilder<> *builder)
1414
llvm::Type *unionType = builder->getInt64Ty(); // 64 bits is the largest size
1515

1616
llvm::Type *valueType = llvm::Type::getInt32Ty(ctx); // Assuming ValueType is a 32-bit enum
17+
llvm::Type *padding = llvm::Type::getInt32Ty(ctx); // Padding for alignment
1718
llvm::Type *sizeType = llvm::Type::getInt64Ty(ctx); // size_t
1819

1920
llvm::StructType *ret = llvm::StructType::create(ctx, "ValueData");
20-
ret->setBody({ unionType, valueType, sizeType });
21+
ret->setBody({ unionType, valueType, padding, sizeType });
2122

2223
return ret;
2324
}

0 commit comments

Comments
 (0)