From f8023e3bc69e13f7ca7cc96b7bef5a76fc110bff Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 2 Oct 2019 16:03:45 +0000 Subject: [PATCH] LowerExpectIntrinsic handlePhiDef - silence static analyzer dyn_cast null dereference warning. NFCI. The static analyzer is warning about a potential null dereference, but we should be able to use cast directly and if not assert will fire for us. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373481 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LowerExpectIntrinsic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp b/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp index cdb1d790667..d85f20b3f80 100644 --- a/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp +++ b/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp @@ -161,7 +161,7 @@ static void handlePhiDef(CallInst *Expect) { return Result; }; - auto *PhiDef = dyn_cast(V); + auto *PhiDef = cast(V); // Get the first dominating conditional branch of the operand // i's incoming block. -- 2.40.0