Skip to content

Commit bab8185

Browse files
committed
Avoid using stale debug location.
1 parent beda51c commit bab8185

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4329,6 +4329,7 @@ workshareLoopTargetCallback(OpenMPIRBuilder *OMPIRBuilder,
43294329
// That's why make an unconditional branch from loop preheader to loop
43304330
// exit block
43314331
Builder.restoreIP({Preheader, Preheader->end()});
4332+
Builder.SetCurrentDebugLocation(Preheader->getTerminator()->getDebugLoc());
43324333
Preheader->getTerminator()->eraseFromParent();
43334334
Builder.CreateBr(CLI->getExit());
43344335

0 commit comments

Comments
 (0)