[llvm] r372166 - NVPTXAsmPrinter - Don't dereference a dyn_cast result. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 12:16:00 PDT 2019
Author: rksimon
Date: Tue Sep 17 12:16:00 2019
New Revision: 372166
URL: http://llvm.org/viewvc/llvm-project?rev=372166&view=rev
Log:
NVPTXAsmPrinter - Don't dereference a dyn_cast result. NFCI.
Modified:
llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
Modified: llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp?rev=372166&r1=372165&r2=372166&view=diff
==============================================================================
--- llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/NVPTX/NVPTXAsmPrinter.cpp Tue Sep 17 12:16:00 2019
@@ -1861,7 +1861,7 @@ void NVPTXAsmPrinter::bufferLEByte(const
case Type::HalfTyID:
case Type::FloatTyID:
case Type::DoubleTyID: {
- const ConstantFP *CFP = dyn_cast<ConstantFP>(CPV);
+ const auto *CFP = cast<ConstantFP>(CPV);
Type *Ty = CFP->getType();
if (Ty == Type::getHalfTy(CPV->getContext())) {
APInt API = CFP->getValueAPF().bitcastToAPInt();
More information about the llvm-commits
mailing list