mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +01:00
AMDGPUPrintfRuntimeBinding - don't dereference a dyn_cast<> pointer. NFCI.
We dereference the dyn_cast<> in all paths - use cast<> to silence the clang static analyzer warning.
This commit is contained in:
parent
3d244dcde9
commit
5fc2b65dfd
@ -356,8 +356,7 @@ bool AMDGPUPrintfRuntimeBindingImpl::lowerPrintfForGpu(Module &M) {
|
||||
//
|
||||
ConstantPointerNull *zeroIntPtr =
|
||||
ConstantPointerNull::get(PointerType::get(Type::getInt8Ty(Ctx), 1));
|
||||
ICmpInst *cmp =
|
||||
dyn_cast<ICmpInst>(Builder.CreateICmpNE(pcall, zeroIntPtr, ""));
|
||||
auto *cmp = cast<ICmpInst>(Builder.CreateICmpNE(pcall, zeroIntPtr, ""));
|
||||
if (!CI->use_empty()) {
|
||||
Value *result =
|
||||
Builder.CreateSExt(Builder.CreateNot(cmp), I32Ty, "printf_res");
|
||||
|
Loading…
Reference in New Issue
Block a user