Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7382,9 +7382,8 @@ static void FixupDebugInfoForOutlinedFunction(
// The location and scope of variable intrinsics and records still point to
// the parent function of the target region. Update them.
for (Instruction &I : instructions(Func)) {
if (auto *DDI = dyn_cast<llvm::DbgVariableIntrinsic>(&I))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: do you think it is worth putting an assertion here that it is not an intrinsic to guard against these being used in the future?

I'm happy to go forward with or without the assertion.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review. I have added an assert.

UpdateDebugRecord(DDI);

assert(!isa<llvm::DbgVariableIntrinsic>(&I) &&
"Unexpected debug intrinsic");
for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
UpdateDebugRecord(&DVR);
}
Expand Down
Loading