forked from OSchip/llvm-project
It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles. llvm-svn: 6894
This commit is contained in:
parent
ef3d5d055d
commit
7610971759
|
@ -1033,7 +1033,8 @@ void CWriter::visitBinaryOperator(Instruction &I) {
|
||||||
// We must cast the results of binary operations which might be promoted.
|
// We must cast the results of binary operations which might be promoted.
|
||||||
bool needsCast = false;
|
bool needsCast = false;
|
||||||
if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy)
|
if ((I.getType() == Type::UByteTy) || (I.getType() == Type::SByteTy)
|
||||||
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)) {
|
|| (I.getType() == Type::UShortTy) || (I.getType() == Type::ShortTy)
|
||||||
|
|| (I.getType() == Type::FloatTy)) {
|
||||||
needsCast = true;
|
needsCast = true;
|
||||||
Out << "((";
|
Out << "((";
|
||||||
printType(Out, I.getType(), "", false, false);
|
printType(Out, I.getType(), "", false, false);
|
||||||
|
|
Loading…
Reference in New Issue