Skip to content

Commit d9c78aa

Browse files
committed
Add message in asserts.
1 parent b0d08b3 commit d9c78aa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Target/LLVMIR/Dialect/OpenMP/OpenMPToLLVMIRTranslation.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5312,9 +5312,9 @@ convertOmpTarget(Operation &opInst, llvm::IRBuilderBase &builder,
53125312
// get the correct debug locations. For outlined functions, the normal MLIR op
53135313
// conversion will automatically pick the correct location.
53145314
llvm::BasicBlock *parentBB = builder.GetInsertBlock();
5315-
assert(parentBB);
5315+
assert(parentBB && "No insert block is set for the builder");
53165316
llvm::Function *parentLLVMFn = parentBB->getParent();
5317-
assert(parentLLVMFn);
5317+
assert(parentLLVMFn && "Parent Function must be valid");
53185318
if (llvm::DISubprogram *SP = parentLLVMFn->getSubprogram())
53195319
builder.SetCurrentDebugLocation(llvm::DILocation::get(
53205320
parentLLVMFn->getContext(), outlinedFnLoc.getLine(),

0 commit comments

Comments
 (0)