Provide a getOpcode() method on CmpInst to ensure the opcode is returned

as the right type. Use this to shorten some code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32300 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2006-12-07 04:18:31 +00:00
parent 7d3223eef2
commit 6b538cfc5c
3 changed files with 7 additions and 4 deletions
+1 -2
View File
@@ -2252,8 +2252,7 @@ BinaryOperator *BinaryOperator::clone() const {
}
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); }