Skip to content

Commit cea2c86

Browse files
authored
[OMPIRBuilder][Debug] Remove unnecessary code. (llvm#156468)
In the code that fix ups the debug information, we handles both the debug intrinsics and debug records. The debug intrinsics are being phased out and I recently changed mlir translation to not generate them. This means that we should not get debug intrinsics anymore and code can be simplified by removing their handling.
1 parent a24e11f commit cea2c86

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7382,9 +7382,8 @@ static void FixupDebugInfoForOutlinedFunction(
73827382
// The location and scope of variable intrinsics and records still point to
73837383
// the parent function of the target region. Update them.
73847384
for (Instruction &I : instructions(Func)) {
7385-
if (auto *DDI = dyn_cast<llvm::DbgVariableIntrinsic>(&I))
7386-
UpdateDebugRecord(DDI);
7387-
7385+
assert(!isa<llvm::DbgVariableIntrinsic>(&I) &&
7386+
"Unexpected debug intrinsic");
73887387
for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange()))
73897388
UpdateDebugRecord(&DVR);
73907389
}

0 commit comments

Comments
 (0)