// ConstantFP
//===----------------------------------------------------------------------===//
// ConstantFP
//===----------------------------------------------------------------------===//
static const fltSemantics *TypeToFloatSemantics(const Type *Ty) {
if (Ty == Type::FloatTy)
return &APFloat::IEEEsingle;
static const fltSemantics *TypeToFloatSemantics(const Type *Ty) {
if (Ty == Type::FloatTy)
return &APFloat::IEEEsingle;
assert(Ty == Type::PPC_FP128Ty && "Unknown FP format");
return &APFloat::PPCDoubleDouble;
}
assert(Ty == Type::PPC_FP128Ty && "Unknown FP format");
return &APFloat::PPCDoubleDouble;
}
/// get() - This returns a constant fp for the specified value in the
/// specified type. This should only be used for simple constant values like
/// get() - This returns a constant fp for the specified value in the
/// specified type. This should only be used for simple constant values like