forked from OSchip/llvm-project
parent
a2f8fc5a72
commit
688f991b38
|
@ -2839,7 +2839,8 @@ APFloat::bitcastToAPInt() const
|
|||
float
|
||||
APFloat::convertToFloat() const
|
||||
{
|
||||
assert(semantics == (const llvm::fltSemantics*)&IEEEsingle && "Float semantics are not IEEEsingle");
|
||||
assert(semantics == (const llvm::fltSemantics*)&IEEEsingle &&
|
||||
"Float semantics are not IEEEsingle");
|
||||
APInt api = bitcastToAPInt();
|
||||
return api.bitsToFloat();
|
||||
}
|
||||
|
@ -2847,7 +2848,8 @@ APFloat::convertToFloat() const
|
|||
double
|
||||
APFloat::convertToDouble() const
|
||||
{
|
||||
assert(semantics == (const llvm::fltSemantics*)&IEEEdouble && "Float semantics are not IEEEdouble");
|
||||
assert(semantics == (const llvm::fltSemantics*)&IEEEdouble &&
|
||||
"Float semantics are not IEEEdouble");
|
||||
APInt api = bitcastToAPInt();
|
||||
return api.bitsToDouble();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue