mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-15 15:48:38 +00:00
Revert 75798 to fix llvm build.
llvm-svn: 75805
This commit is contained in:
parent
9a193635a4
commit
1e644a928d
@ -255,6 +255,20 @@ ConstantInt *ConstantInt::get(const APInt& V) {
|
||||
// ConstantFP
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static const fltSemantics *TypeToFloatSemantics(const Type *Ty) {
|
||||
if (Ty == Type::FloatTy)
|
||||
return &APFloat::IEEEsingle;
|
||||
if (Ty == Type::DoubleTy)
|
||||
return &APFloat::IEEEdouble;
|
||||
if (Ty == Type::X86_FP80Ty)
|
||||
return &APFloat::x87DoubleExtended;
|
||||
else if (Ty == Type::FP128Ty)
|
||||
return &APFloat::IEEEquad;
|
||||
|
||||
assert(Ty == Type::PPC_FP128Ty && "Unknown FP format");
|
||||
return &APFloat::PPCDoubleDouble;
|
||||
}
|
||||
|
||||
ConstantFP::ConstantFP(const Type *Ty, const APFloat& V)
|
||||
: Constant(Ty, ConstantFPVal, 0, 0), Val(V) {
|
||||
assert(&V.getSemantics() == TypeToFloatSemantics(Ty) &&
|
||||
|
Loading…
Reference in New Issue
Block a user