[llvm-commits] CVS: llvm/lib/CWriter/Writer.cpp

Brian Gaeke gaeke at cs.uiuc.edu
Fri Nov 21 23:04:02 PST 2003


Changes in directory llvm/lib/CWriter:

Writer.cpp updated: 1.144 -> 1.145

---
Log message:

Fix PR149 - support constant shift expressions.


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

Index: llvm/lib/CWriter/Writer.cpp
diff -u llvm/lib/CWriter/Writer.cpp:1.144 llvm/lib/CWriter/Writer.cpp:1.145
--- llvm/lib/CWriter/Writer.cpp:1.144	Sun Nov 16 16:06:14 2003
+++ llvm/lib/CWriter/Writer.cpp	Fri Nov 21 23:02:56 2003
@@ -396,6 +396,8 @@
     case Instruction::SetLE:
     case Instruction::SetGT:
     case Instruction::SetGE:
+    case Instruction::Shl:
+    case Instruction::Shr:
       Out << "(";
       printConstant(CE->getOperand(0));
       switch (CE->getOpcode()) {
@@ -410,6 +412,8 @@
       case Instruction::SetLE: Out << " <= "; break;
       case Instruction::SetGT: Out << " > "; break;
       case Instruction::SetGE: Out << " >= "; break;
+      case Instruction::Shl: Out << " << "; break;
+      case Instruction::Shr: Out << " >> "; break;
       default: assert(0 && "Illegal opcode here!");
       }
       printConstant(CE->getOperand(1));





More information about the llvm-commits mailing list