mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-28 07:17:32 +00:00
Remove a bunch of warnings from the CBE generated C code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8455 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -869,12 +869,12 @@ void CWriter::printFunction(Function *F) {
|
|||||||
if (FPC->getType() == Type::DoubleTy)
|
if (FPC->getType() == Type::DoubleTy)
|
||||||
Out << " const ConstantDoubleTy FloatConstant" << FPCounter++
|
Out << " const ConstantDoubleTy FloatConstant" << FPCounter++
|
||||||
<< " = 0x" << std::hex << *(unsigned long long*)&Val << std::dec
|
<< " = 0x" << std::hex << *(unsigned long long*)&Val << std::dec
|
||||||
<< "; /* " << Val << " */\n";
|
<< "ULL; /* " << Val << " */\n";
|
||||||
else if (FPC->getType() == Type::FloatTy) {
|
else if (FPC->getType() == Type::FloatTy) {
|
||||||
float fVal = Val;
|
float fVal = Val;
|
||||||
Out << " const ConstantFloatTy FloatConstant" << FPCounter++
|
Out << " const ConstantFloatTy FloatConstant" << FPCounter++
|
||||||
<< " = 0x" << std::hex << *(unsigned*)&fVal << std::dec
|
<< " = 0x" << std::hex << *(unsigned*)&fVal << std::dec
|
||||||
<< "; /* " << Val << " */\n";
|
<< "U; /* " << Val << " */\n";
|
||||||
} else
|
} else
|
||||||
assert(0 && "Unknown float type!");
|
assert(0 && "Unknown float type!");
|
||||||
}
|
}
|
||||||
|
@@ -869,12 +869,12 @@ void CWriter::printFunction(Function *F) {
|
|||||||
if (FPC->getType() == Type::DoubleTy)
|
if (FPC->getType() == Type::DoubleTy)
|
||||||
Out << " const ConstantDoubleTy FloatConstant" << FPCounter++
|
Out << " const ConstantDoubleTy FloatConstant" << FPCounter++
|
||||||
<< " = 0x" << std::hex << *(unsigned long long*)&Val << std::dec
|
<< " = 0x" << std::hex << *(unsigned long long*)&Val << std::dec
|
||||||
<< "; /* " << Val << " */\n";
|
<< "ULL; /* " << Val << " */\n";
|
||||||
else if (FPC->getType() == Type::FloatTy) {
|
else if (FPC->getType() == Type::FloatTy) {
|
||||||
float fVal = Val;
|
float fVal = Val;
|
||||||
Out << " const ConstantFloatTy FloatConstant" << FPCounter++
|
Out << " const ConstantFloatTy FloatConstant" << FPCounter++
|
||||||
<< " = 0x" << std::hex << *(unsigned*)&fVal << std::dec
|
<< " = 0x" << std::hex << *(unsigned*)&fVal << std::dec
|
||||||
<< "; /* " << Val << " */\n";
|
<< "U; /* " << Val << " */\n";
|
||||||
} else
|
} else
|
||||||
assert(0 && "Unknown float type!");
|
assert(0 && "Unknown float type!");
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user