File tree Expand file tree Collapse file tree 1 file changed +1
-9
lines changed
Expand file tree Collapse file tree 1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -546,19 +546,11 @@ void LLVMCodeBuilder::yield()
546546void LLVMCodeBuilder::initTypes ()
547547{
548548 // Create the ValueData struct
549- llvm::Type *doubleType = llvm::Type::getDoubleTy (m_ctx); // double (numberValue)
550- llvm::Type *boolType = llvm::Type::getInt1Ty (m_ctx); // bool (boolValue)
551- llvm::Type *stringPtrType = llvm::PointerType::get (llvm::Type::getInt8Ty (m_ctx), 0 ); // char* (stringValue)
549+ llvm::Type *unionType = m_builder.getInt64Ty (); // 64 bits is the largest size
552550
553- // Create the union type (largest type size should dominate)
554- llvm::StructType *unionType = llvm::StructType::create (m_ctx, " union" );
555- unionType->setBody ({ doubleType, boolType, stringPtrType });
556-
557- // Create the full struct type
558551 llvm::Type *valueType = llvm::Type::getInt32Ty (m_ctx); // Assuming ValueType is a 32-bit enum
559552 llvm::Type *sizeType = llvm::Type::getInt64Ty (m_ctx); // size_t
560553
561- // Combine them into the full struct
562554 m_valueDataType = llvm::StructType::create (m_ctx, " ValueData" );
563555 m_valueDataType->setBody ({ unionType, valueType, sizeType });
564556}
You can’t perform that action at this time.
0 commit comments