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

Support for static field exporting

This commit is contained in:
Brian Fiete 2020-09-21 23:38:50 -07:00
parent 989f9e6019
commit 6878183873
9 changed files with 61 additions and 7 deletions

View file

@ -233,6 +233,7 @@ enum BfIRCmd : uint8
BfIRCmd_GlobalVar_SetUnnamedAddr,
BfIRCmd_GlobalVar_SetInitializer,
BfIRCmd_GlobalVar_SetAlignment,
BfIRCmd_GlobalVar_SetStorageKind,
BfIRCmd_GlobalStringPtr,
BfIRCmd_CreateBlock,
@ -464,6 +465,13 @@ enum BfIRAtomicOrdering : uint8
BfIRAtomicOrdering_ReturnModified = 0x10 // Generally atomic instructions return original value, this overrides that
};
enum BfIRStorageKind : uint8
{
BfIRStorageKind_Normal,
BfIRStorageKind_Import,
BfIRStorageKind_Export
};
//#define CHECK_CONSTHOLDER
struct BfIRRawValue
@ -1164,6 +1172,7 @@ public:
void GlobalVar_SetUnnamedAddr(BfIRValue val, bool unnamedAddr);
void GlobalVar_SetInitializer(BfIRValue globalVar, BfIRValue initVal);
void GlobalVar_SetAlignment(BfIRValue globalVar, int alignment);
void GlobalVar_SetStorageKind(BfIRValue globalVar, BfIRStorageKind storageKind);
BfIRValue CreateGlobalStringPtr(const StringImpl& str);
BfIRBlock CreateBlock(const StringImpl& name, bool addNow = false);