1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-07-04 23:36:00 +02:00

Improved generic constraint const conversion handling

This commit is contained in:
Brian Fiete 2022-05-06 12:49:57 -07:00
parent c750ed076c
commit e5c4321440
4 changed files with 35 additions and 3 deletions

View file

@ -948,6 +948,7 @@ public:
BfConstant* GetConstant(BfIRValue id);
bool TryGetBool(BfIRValue id, bool& boolVal);
int IsZero(BfIRValue val);
bool IsConstValue(BfIRValue val);
int CheckConstEquality(BfIRValue lhs, BfIRValue rhs); // -1 = fail, 0 = false, 1 = true
//void WriteConstant(void* data, BeConstant* constVal);
@ -970,7 +971,7 @@ public:
BfIRValue CreateGlobalVariableConstant(BfIRType varType, bool isConstant, BfIRLinkageType linkageType, BfIRValue initializer, const StringImpl& name, bool isTLS = false);
bool WriteConstant(BfIRValue val, void* ptr, BfType* type);
BfIRValue ReadConstant(void* ptr, BfType* type);
BfIRValue ReadConstant(void* ptr, BfType* type);
};
enum BfIRPopulateType