[llvm-commits] CVS: llvm/lib/Target/CBackend/CBackend.cpp

Chris Lattner sabre at nondot.org
Sun Jan 14 17:48:29 PST 2007



Changes in directory llvm/lib/Target/CBackend:

CBackend.cpp updated: 1.315 -> 1.316
---
Log message:

Make use of isInteger vs isIntegral more explicit


---
Diffs of the changes:  (+4 -4)

 CBackend.cpp |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


Index: llvm/lib/Target/CBackend/CBackend.cpp
diff -u llvm/lib/Target/CBackend/CBackend.cpp:1.315 llvm/lib/Target/CBackend/CBackend.cpp:1.316
--- llvm/lib/Target/CBackend/CBackend.cpp:1.315	Fri Jan 12 16:52:50 2007
+++ llvm/lib/Target/CBackend/CBackend.cpp	Sun Jan 14 19:48:11 2007
@@ -1022,7 +1022,7 @@
   }
   if (NeedsExplicitCast) {
     Out << "((";
-    if (Ty->isInteger())
+    if (Ty->isIntegral() && Ty != Type::Int1Ty)
       printSimpleType(Out, Ty, TypeIsSigned);
     else
       printType(Out, Ty); // not integer, sign doesn't matter
@@ -1225,7 +1225,7 @@
   // operand.
   if (shouldCast) {
     Out << "((";
-    if (OpTy->isInteger())
+    if (OpTy->isIntegral() && OpTy != Type::Int1Ty)
       printSimpleType(Out, OpTy, castIsSigned);
     else
       printType(Out, OpTy); // not integer, sign doesn't matter
@@ -1848,8 +1848,8 @@
     return false;
   const Type *SrcTy = I.getOperand(0)->getType();
   const Type *DstTy = I.getType();
-  return (SrcTy->isFloatingPoint() && DstTy->isInteger()) ||
-         (DstTy->isFloatingPoint() && SrcTy->isInteger());
+  return (SrcTy->isFloatingPoint() && DstTy->isIntegral()) ||
+         (DstTy->isFloatingPoint() && SrcTy->isIntegral());
 }
 
 void CWriter::printFunction(Function &F) {






More information about the llvm-commits mailing list