From ed71f684be376550850953ff0bb9ec1ce981307d Mon Sep 17 00:00:00 2001 From: Anton Mitrokhin Date: Tue, 27 Oct 2015 17:46:47 +0300 Subject: [PATCH] Use 'dyn_cast_or_null' instead of 'dyn_cast' --- stmt.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stmt.cpp b/stmt.cpp index b96dd55c..1ff8979d 100644 --- a/stmt.cpp +++ b/stmt.cpp @@ -1261,7 +1261,7 @@ ForStmt::EmitCode(FunctionEmitContext *ctx) const { ctx->SetCurrentBasicBlock(bloop); ctx->SetBlockEntryMask(ctx->GetFullMask()); ctx->AddInstrumentationPoint("for loop body"); - if (!llvm::dyn_cast(stmts)) + if (!llvm::dyn_cast_or_null(stmts)) ctx->StartScope(); if (doCoherentCheck && !uniformTest) { @@ -1306,7 +1306,7 @@ ForStmt::EmitCode(FunctionEmitContext *ctx) const { if (ctx->GetCurrentBasicBlock()) ctx->BranchInst(bstep); } - if (!llvm::dyn_cast(stmts)) + if (!llvm::dyn_cast_or_null(stmts)) ctx->EndScope(); // Emit code for the loop step. First, restore the lane mask of any