1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

SetCurrentDebugLocation after BfIRCmd_SetInsertPointAtStart

This commit is contained in:
Brian Fiete 2024-09-09 10:29:59 -04:00
parent e1d5efe4de
commit e50a1a3134

View file

@ -511,6 +511,19 @@ void pve(const BfIRTypedValue& typedValue)
pte(typedValue.mTypeEx);
}
void pirb(llvm::IRBuilder<>* irBuilder)
{
Beefy::debug_ostream os;
os << "Debug loc: ";
auto debugLoc = irBuilder->getCurrentDebugLocation();
if (debugLoc.get() == NULL)
os << "NULL";
else
debugLoc->print(os);
os << "\n";
os.flush();
}
void BfIRCodeGen::FixValues(llvm::StructType* structType, llvm::SmallVector<llvm::Value*, 8>& values)
{
if (values.size() >= structType->getNumElements())
@ -3076,7 +3089,9 @@ void BfIRCodeGen::HandleNextCmd()
case BfIRCmd_SetInsertPointAtStart:
{
CMD_PARAM(llvm::BasicBlock*, block);
mIRBuilder->SetInsertPoint(block, block->begin());
mIRBuilder->SetInsertPoint(block, block->begin());
// SetInsertPoint can clear the debug loc so reset it here
mIRBuilder->SetCurrentDebugLocation(mDebugLoc);
}
break;
case BfIRCmd_EraseFromParent: