mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 03:28:20 +02:00
Renamed TypeCode_Single to TypeCode_Float. Float struct interop fixes.
This commit is contained in:
parent
14c3d0cd35
commit
2fe209447e
20 changed files with 595 additions and 69 deletions
|
@ -1250,7 +1250,7 @@ void BeCOFFObject::DbgOutputLocalVar(BeDbgFunction* dbgFunc, BeDbgVariable* dbgV
|
|||
if ((beConst->mType != NULL) && (!beConst->mType->IsPointer()))
|
||||
{
|
||||
int64 writeVal = beConst->mInt64;
|
||||
if (beConst->mType->mTypeCode == BfTypeCode_Single)
|
||||
if (beConst->mType->mTypeCode == BfTypeCode_Float)
|
||||
{
|
||||
// We need to do this because Singles are stored in mDouble, so we need to reduce here
|
||||
float floatVal = (float)beConst->mDouble;
|
||||
|
|
|
@ -367,7 +367,7 @@ BeType* BeIRCodeGen::GetBeType(BfTypeCode typeCode, bool& isSigned)
|
|||
return llvm::Type::getInt32Ty(*mLLVMContext);
|
||||
else
|
||||
return llvm::Type::getInt64Ty(*mLLVMContext);*/
|
||||
case BfTypeCode_Single:
|
||||
case BfTypeCode_Float:
|
||||
beTypeCode = BeTypeCode_Float;
|
||||
break;
|
||||
case BfTypeCode_Double:
|
||||
|
@ -483,7 +483,7 @@ BfTypeCode BeIRCodeGen::GetTypeCode(BeType * type, bool isSigned)
|
|||
case BeTypeCode_Int64:
|
||||
return (isSigned) ? BfTypeCode_Int64 : BfTypeCode_UInt64;
|
||||
case BeTypeCode_Float:
|
||||
return BfTypeCode_Single;
|
||||
return BfTypeCode_Float;
|
||||
case BeTypeCode_Double:
|
||||
return BfTypeCode_Double;
|
||||
default:
|
||||
|
@ -790,7 +790,7 @@ void BeIRCodeGen::Read(BeValue*& beValue)
|
|||
bool isSigned = false;
|
||||
BeType* llvmConstType = GetBeType(typeCode, isSigned);
|
||||
|
||||
if (typeCode == BfTypeCode_Single)
|
||||
if (typeCode == BfTypeCode_Float)
|
||||
{
|
||||
float f;
|
||||
mStream->Read(&f, sizeof(float));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue