Use 'dyn_cast_or_null' instead of 'dyn_cast'
This commit is contained in:
4
stmt.cpp
4
stmt.cpp
@@ -1261,7 +1261,7 @@ ForStmt::EmitCode(FunctionEmitContext *ctx) const {
|
|||||||
ctx->SetCurrentBasicBlock(bloop);
|
ctx->SetCurrentBasicBlock(bloop);
|
||||||
ctx->SetBlockEntryMask(ctx->GetFullMask());
|
ctx->SetBlockEntryMask(ctx->GetFullMask());
|
||||||
ctx->AddInstrumentationPoint("for loop body");
|
ctx->AddInstrumentationPoint("for loop body");
|
||||||
if (!llvm::dyn_cast<StmtList>(stmts))
|
if (!llvm::dyn_cast_or_null<StmtList>(stmts))
|
||||||
ctx->StartScope();
|
ctx->StartScope();
|
||||||
|
|
||||||
if (doCoherentCheck && !uniformTest) {
|
if (doCoherentCheck && !uniformTest) {
|
||||||
@@ -1306,7 +1306,7 @@ ForStmt::EmitCode(FunctionEmitContext *ctx) const {
|
|||||||
if (ctx->GetCurrentBasicBlock())
|
if (ctx->GetCurrentBasicBlock())
|
||||||
ctx->BranchInst(bstep);
|
ctx->BranchInst(bstep);
|
||||||
}
|
}
|
||||||
if (!llvm::dyn_cast<StmtList>(stmts))
|
if (!llvm::dyn_cast_or_null<StmtList>(stmts))
|
||||||
ctx->EndScope();
|
ctx->EndScope();
|
||||||
|
|
||||||
// Emit code for the loop step. First, restore the lane mask of any
|
// Emit code for the loop step. First, restore the lane mask of any
|
||||||
|
|||||||
Reference in New Issue
Block a user