mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Made global creation failure more debuggable
This commit is contained in:
parent
b6f2762f19
commit
9facb06d52
3 changed files with 5 additions and 5 deletions
|
@ -1755,9 +1755,9 @@ void BeIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(BeType*, varType);
|
||||
CMD_PARAM(bool, isConstant);
|
||||
BfIRLinkageType linkageType = (BfIRLinkageType)mStream->Read();
|
||||
CMD_PARAM(BeConstant*, initializer);
|
||||
CMD_PARAM(String, name);
|
||||
CMD_PARAM(bool, isTLS);
|
||||
CMD_PARAM(BeConstant*, initializer);
|
||||
|
||||
auto globalVariable = mBeModule->mGlobalVariables.Alloc();
|
||||
globalVariable->mModule = mBeModule;
|
||||
|
|
|
@ -4307,7 +4307,7 @@ BfIRValue BfIRBuilder::CreateGlobalVariable(BfIRType varType, bool isConstant, B
|
|||
if (initializer)
|
||||
mHasGlobalDefs = true;
|
||||
|
||||
BfIRValue retVal = WriteCmd(BfIRCmd_GlobalVariable, varType, isConstant, (uint8)linkageType, initializer, name, isTLS);
|
||||
BfIRValue retVal = WriteCmd(BfIRCmd_GlobalVariable, varType, isConstant, (uint8)linkageType, name, isTLS, initializer);
|
||||
constGV->mStreamId = retVal.mId;
|
||||
retVal.mFlags = BfIRValueFlags_Const;
|
||||
#ifdef CHECK_CONSTHOLDER
|
||||
|
|
|
@ -1906,9 +1906,9 @@ void BfIRCodeGen::HandleNextCmd()
|
|||
CMD_PARAM(llvm::Type*, varType);
|
||||
CMD_PARAM(bool, isConstant);
|
||||
BfIRLinkageType linkageType = (BfIRLinkageType)mStream->Read();
|
||||
CMD_PARAM(llvm::Constant*, initializer);
|
||||
CMD_PARAM(String, name);
|
||||
CMD_PARAM(bool, isTLS);
|
||||
CMD_PARAM(llvm::Constant*, initializer);
|
||||
|
||||
auto globalVariable = new llvm::GlobalVariable(
|
||||
*mLLVMModule,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue