forked from OSchip/llvm-project
parent
2dd003e807
commit
9da7bc110a
|
@ -225,7 +225,11 @@ public:
|
|||
|
||||
const llvm::APFloat &getValue() const { return Value; }
|
||||
|
||||
double getValueAsDouble() const {
|
||||
/// getValueAsDouble - This returns the value as an inaccurate double. Note
|
||||
/// that this may cause loss of precision, but is useful for debugging dumps
|
||||
/// etc.
|
||||
double getValueAsDouble() const {
|
||||
// FIXME: We need something for long double here.
|
||||
if (cast<BuiltinType>(getType())->getKind() == BuiltinType::Float)
|
||||
return Value.convertToFloat();
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue