mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-27 05:32:22 +00:00
Previous checkin broke printf(%a) support for fp constants-- re-fix it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16051 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8a702e8e1b
commit
07b52b367f
@ -590,7 +590,15 @@ void CWriter::printConstant(Constant *CPV) {
|
||||
Out << "LLVM_INF" << (FPC->getType() == Type::FloatTy ? "F" : "")
|
||||
<< " /*inf*/ ";
|
||||
} else {
|
||||
std::string Num = ftostr(FPC->getValue());
|
||||
std::string Num;
|
||||
#if HAVE_PRINTF_A
|
||||
// Print out the constant as a floating point number.
|
||||
char Buffer[100];
|
||||
sprintf(Buffer, "%a", FPC->getValue());
|
||||
Num = Buffer;
|
||||
#else
|
||||
Num = ftostr(FPC->getValue());
|
||||
#endif
|
||||
Out << Num;
|
||||
}
|
||||
}
|
||||
|
@ -590,7 +590,15 @@ void CWriter::printConstant(Constant *CPV) {
|
||||
Out << "LLVM_INF" << (FPC->getType() == Type::FloatTy ? "F" : "")
|
||||
<< " /*inf*/ ";
|
||||
} else {
|
||||
std::string Num = ftostr(FPC->getValue());
|
||||
std::string Num;
|
||||
#if HAVE_PRINTF_A
|
||||
// Print out the constant as a floating point number.
|
||||
char Buffer[100];
|
||||
sprintf(Buffer, "%a", FPC->getValue());
|
||||
Num = Buffer;
|
||||
#else
|
||||
Num = ftostr(FPC->getValue());
|
||||
#endif
|
||||
Out << Num;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user