AMDGPUPrintfRuntimeBinding.cpp - drop unnecessary casts/dyn_casts. NFCI.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Sep 2020 13:48:40 +0000 (14:48 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 15 Sep 2020 13:49:04 +0000 (14:49 +0100)
commit97a23ab28ad91d589e6c0bb5dee6ae78c154da8a
tree0133e6314710c0e7232027cfc6f7f6b42596c021
parent65c6ae3b6aceb934a76c5b10b244edeed80e9cac
AMDGPUPrintfRuntimeBinding.cpp - drop unnecessary casts/dyn_casts. NFCI.

GetElementPtrInst::Create returns a GetElementPtrInst* so we don't need to cast. Similarly IntegerType inherits from the Type base class.

Also, I've used auto* in a few places to cleanup the code.

Helps fix some clang-tidy warnings which saw the dyn_casts and warned that these can return null.
llvm/lib/Target/AMDGPU/AMDGPUPrintfRuntimeBinding.cpp