@@ -2218,7 +2218,7 @@ bool SimplifyCFGOpt::SpeculativelyExecuteBB(BranchInst *BI, BasicBlock *ThenBB,
2218
2218
// be misleading while debugging.
2219
2219
for (auto &I : *ThenBB) {
2220
2220
if (!SpeculatedStoreValue || &I != SpeculatedStore)
2221
- I.setDebugLoc ( DebugLoc () );
2221
+ I.dropLocation ( );
2222
2222
I.dropUnknownNonDebugMetadata ();
2223
2223
}
2224
2224
@@ -2878,7 +2878,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
2878
2878
// When we fold the bonus instructions we want to make sure we
2879
2879
// reset their debug locations in order to avoid stepping on dead
2880
2880
// code caused by folding dead branches.
2881
- NewBonusInst->setDebugLoc ( DebugLoc () );
2881
+ NewBonusInst->dropLocation ( );
2882
2882
2883
2883
RemapInstruction (NewBonusInst, VMap,
2884
2884
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
@@ -2902,7 +2902,7 @@ bool llvm::FoldBranchToCommonDest(BranchInst *BI, MemorySSAUpdater *MSSAU,
2902
2902
2903
2903
// Reset the condition debug location to avoid jumping on dead code
2904
2904
// as the result of folding dead branches.
2905
- CondInPred->setDebugLoc ( DebugLoc () );
2905
+ CondInPred->dropLocation ( );
2906
2906
2907
2907
RemapInstruction (CondInPred, VMap,
2908
2908
RF_NoModuleLevelChanges | RF_IgnoreMissingLocals);
0 commit comments