From c81f8e4ce10303d0e787383d985fc93b7052f78a Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Tue, 24 Sep 2019 10:46:30 +0000 Subject: [PATCH] lowerObjCCall - silence static analyzer dyn_cast null dereference warnings. 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. llvm-svn: 372720 --- llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp index 2752e186875c..0d2f6f99ca96 100644 --- a/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp +++ b/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp @@ -76,7 +76,7 @@ static bool lowerObjCCall(Function &F, const char *NewFn, } for (auto I = F.use_begin(), E = F.use_end(); I != E;) { - auto *CI = dyn_cast(I->getUser()); + auto *CI = cast(I->getUser()); assert(CI->getCalledFunction() && "Cannot lower an indirect call!"); ++I;