Changes in directory llvm/lib/VMCore:

Constants.cpp updated: 1.182 -> 1.183
Instructions.cpp updated: 1.53 -> 1.54
---
Log message:

Provide a getOpcode() method on CmpInst to ensure the opcode is returned
as the right type. Use this to shorten some code.


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

 Constants.cpp    |    3 +--
 Instructions.cpp |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)


Index: llvm/lib/VMCore/Constants.cpp
diff -u llvm/lib/VMCore/Constants.cpp:1.182 llvm/lib/VMCore/Constants.cpp:1.183
--- llvm/lib/VMCore/Constants.cpp:1.182 Wed Dec  6 14:30:17 2006
+++ llvm/lib/VMCore/Constants.cpp       Wed Dec  6 22:18:31 2006
@@ -378,8 +378,7 @@
   Use Ops[2];
   CompareConstantExpr(Instruction::OtherOps opc, unsigned short pred, 
                       Constant* LHS, Constant* RHS)
-    : ConstantExpr(Type::BoolTy, Instruction::OtherOps(opc), Ops, 2),
-      predicate(pred) {
+    : ConstantExpr(Type::BoolTy, opc, Ops, 2), predicate(pred) {
     OperandList[0].init(LHS, this);
     OperandList[1].init(RHS, this);
   }


Index: llvm/lib/VMCore/Instructions.cpp
diff -u llvm/lib/VMCore/Instructions.cpp:1.53 
llvm/lib/VMCore/Instructions.cpp:1.54
--- llvm/lib/VMCore/Instructions.cpp:1.53       Tue Dec  5 17:43:59 2006
+++ llvm/lib/VMCore/Instructions.cpp    Wed Dec  6 22:18:31 2006
@@ -2252,8 +2252,7 @@
 }
 
 CmpInst* CmpInst::clone() const {
-  return create(Instruction::OtherOps(getOpcode()), getPredicate(), 
-                Ops[0], Ops[1]);
+  return create(getOpcode(), getPredicate(), Ops[0], Ops[1]);
 }
 
 MallocInst *MallocInst::clone()   const { return new MallocInst(*this); }



_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to