forked from OSchip/llvm-project
NVPTXAsmPrinter - Don't dereference a dyn_cast result. NFCI.
llvm-svn: 372166
This commit is contained in:
parent
6e1a9b0fdf
commit
5a5f04afcb
|
@ -1861,7 +1861,7 @@ void NVPTXAsmPrinter::bufferLEByte(const Constant *CPV, int Bytes,
|
|||
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();
|
||||
|
|
Loading…
Reference in New Issue