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

DupDebugLocation support

This commit is contained in:
Brian Fiete 2020-05-13 07:43:25 -07:00
parent 577cd2e270
commit d2edcd2ae9
3 changed files with 10 additions and 0 deletions

View file

@ -4584,6 +4584,12 @@ void BfIRBuilder::RestoreDebugLocation()
}
}
void BfIRBuilder::DupDebugLocation()
{
WriteCmd(BfIRCmd_DupDebugLocation);
NEW_CMD_INSERTED;
}
bool BfIRBuilder::HasDebugLocation()
{
return mHasDebugLoc;

View file

@ -283,6 +283,7 @@ enum BfIRCmd : uint8
BfIRCmd_SaveDebugLocation,
BfIRCmd_RestoreDebugLocation,
BfIRCmd_DupDebugLocation,
BfIRCmd_ClearDebugLocation,
BfIRCmd_ClearDebugLocationInst,
BfIRCmd_ClearDebugLocationInstLast,
@ -1181,6 +1182,7 @@ public:
void SaveDebugLocation();
void RestoreDebugLocation();
void DupDebugLocation();
bool HasDebugLocation();
void ClearDebugLocation();
void ClearDebugLocation(BfIRValue inst);

View file

@ -2599,6 +2599,8 @@ void BfIRCodeGen::HandleNextCmd()
mSavedDebugLocs.pop_back();
}
break;
case BfIRCmd_DupDebugLocation:
break;
case BfIRCmd_ClearDebugLocation:
{
mDebugLoc = llvm::DebugLoc();