From: Simon Pilgrim Date: Sun, 22 Sep 2019 13:01:49 +0000 (+0000) Subject: AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2de9b107facc2a0320e081787e8dfae43be83008;p=platform%2Fupstream%2Fllvm.git AMDGPUPrintfRuntimeBinding - silence static analyzer null dereference warnings. NFCI. llvm-svn: 372501 --- diff --git a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp index 90ea246..261d628 100644 --- a/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp +++ b/llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp @@ -163,8 +163,7 @@ bool AMDGPUPrintfRuntimeBinding::lowerPrintfForGpu( const char NonLiteralStr[4] = "???"; for (auto P : Printfs) { - CallInst *CI = dyn_cast(P); - + auto CI = cast(P); unsigned NumOps = CI->getNumArgOperands(); SmallString<16> OpConvSpecifiers; @@ -566,7 +565,7 @@ bool AMDGPUPrintfRuntimeBinding::lowerPrintfForGpu( // erase the printf calls for (auto P : Printfs) { - CallInst *CI = dyn_cast(P); + auto CI = cast(P); CI->eraseFromParent(); }