mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-30 00:24:00 +00:00
_REALLY_ fix the float constant problem
llvm-svn: 4609
This commit is contained in:
parent
18f46ff428
commit
3de4680d56
@ -778,11 +778,12 @@ void CWriter::printFunction(Function *F) {
|
||||
Out << " const ConstantDoubleTy FloatConstant" << FPCounter++
|
||||
<< " = 0x" << std::hex << *(unsigned long long*)&Val << std::dec
|
||||
<< "; /* " << Val << " */\n";
|
||||
else if (FPC->getType() == Type::FloatTy)
|
||||
else if (FPC->getType() == Type::FloatTy) {
|
||||
float fVal = Val;
|
||||
Out << " const ConstantFloatTy FloatConstant" << FPCounter++
|
||||
<< " = 0x" << std::hex << *(unsigned*)&Val << std::dec
|
||||
<< " = 0x" << std::hex << *(unsigned*)&fVal << std::dec
|
||||
<< "; /* " << Val << " */\n";
|
||||
else
|
||||
} else
|
||||
assert(0 && "Unknown float type!");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user