File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -352,26 +352,14 @@ Constant *Constant::getNullValue(Type *Ty) {
352
352
case Type::IntegerTyID:
353
353
return ConstantInt::get (Ty, 0 );
354
354
case Type::HalfTyID:
355
- return ConstantFP::get (Ty->getContext (),
356
- APFloat::getZero (APFloat::IEEEhalf ()));
357
355
case Type::BFloatTyID:
358
- return ConstantFP::get (Ty->getContext (),
359
- APFloat::getZero (APFloat::BFloat ()));
360
356
case Type::FloatTyID:
361
- return ConstantFP::get (Ty->getContext (),
362
- APFloat::getZero (APFloat::IEEEsingle ()));
363
357
case Type::DoubleTyID:
364
- return ConstantFP::get (Ty->getContext (),
365
- APFloat::getZero (APFloat::IEEEdouble ()));
366
358
case Type::X86_FP80TyID:
367
- return ConstantFP::get (Ty->getContext (),
368
- APFloat::getZero (APFloat::x87DoubleExtended ()));
369
359
case Type::FP128TyID:
370
- return ConstantFP::get (Ty->getContext (),
371
- APFloat::getZero (APFloat::IEEEquad ()));
372
360
case Type::PPC_FP128TyID:
373
- return ConstantFP::get (Ty->getContext (), APFloat ( APFloat::PPCDoubleDouble (),
374
- APInt ::getZero (128 )));
361
+ return ConstantFP::get (Ty->getContext (),
362
+ APFloat ::getZero (Ty-> getFltSemantics ( )));
375
363
case Type::PointerTyID:
376
364
return ConstantPointerNull::get (cast<PointerType>(Ty));
377
365
case Type::StructTyID:
You can’t perform that action at this time.
0 commit comments