[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp
Brian Gaeke
gaeke at cs.uiuc.edu
Tue Jun 24 22:06:00 PDT 2003
Changes in directory llvm/lib/CWriter:
Writer.cpp updated: 1.98 -> 1.99
---
Log message:
It seems likely that floats would need a cast too, because they are
ordinarily promoted to doubles.
---
Diffs of the changes:
Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.98 llvm/lib/CWriter/Writer.cpp:1.99
--- llvm/lib/CWriter/Writer.cpp:1.98 Mon Jun 23 15:00:51 2003
+++ llvm/lib/CWriter/Writer.cpp Tue Jun 24 22:05:33 2003
@@ -1033,7 +1033,8 @@
// We must cast the results of binary operations which might be promoted.
bool needsCast = false;
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;
Out << "((";
printType(Out, I.getType(), "", false, false);
More information about the llvm-commits
mailing list