diff --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp index e740c2819fec9..03ea58318d4a9 100644 --- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp +++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp @@ -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(&I)) - UpdateDebugRecord(DDI); - + assert(!isa(&I) && + "Unexpected debug intrinsic"); for (DbgVariableRecord &DVR : filterDbgVars(I.getDbgRecordRange())) UpdateDebugRecord(&DVR); }