diff --git a/IDEHelper/Compiler/BfIRBuilder.cpp b/IDEHelper/Compiler/BfIRBuilder.cpp index 490a6b76..3a403bc4 100644 --- a/IDEHelper/Compiler/BfIRBuilder.cpp +++ b/IDEHelper/Compiler/BfIRBuilder.cpp @@ -4584,6 +4584,12 @@ void BfIRBuilder::RestoreDebugLocation() } } +void BfIRBuilder::DupDebugLocation() +{ + WriteCmd(BfIRCmd_DupDebugLocation); + NEW_CMD_INSERTED; +} + bool BfIRBuilder::HasDebugLocation() { return mHasDebugLoc; diff --git a/IDEHelper/Compiler/BfIRBuilder.h b/IDEHelper/Compiler/BfIRBuilder.h index 44cdc06d..9a7c2d7c 100644 --- a/IDEHelper/Compiler/BfIRBuilder.h +++ b/IDEHelper/Compiler/BfIRBuilder.h @@ -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); diff --git a/IDEHelper/Compiler/BfIRCodeGen.cpp b/IDEHelper/Compiler/BfIRCodeGen.cpp index 5ea6f374..a15c53c1 100644 --- a/IDEHelper/Compiler/BfIRCodeGen.cpp +++ b/IDEHelper/Compiler/BfIRCodeGen.cpp @@ -2599,6 +2599,8 @@ void BfIRCodeGen::HandleNextCmd() mSavedDebugLocs.pop_back(); } break; + case BfIRCmd_DupDebugLocation: + break; case BfIRCmd_ClearDebugLocation: { mDebugLoc = llvm::DebugLoc();