diff options
author | Craig Topper <craig.topper@gmail.com> | 2015-12-15 06:11:33 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2015-12-15 06:11:33 +0000 |
commit | 1c3f28313ed0f0282c5a4f339611a15cca61bfdd (patch) | |
tree | 1654fd30ffd316b9b2ca5cf8e214e9eb2a782f33 /llvm/lib/IR/Instructions.cpp | |
parent | 350311974b6b67fc5832f6984fb711d8263e0703 (diff) | |
download | llvm-1c3f28313ed0f0282c5a4f339611a15cca61bfdd.zip llvm-1c3f28313ed0f0282c5a4f339611a15cca61bfdd.tar.gz llvm-1c3f28313ed0f0282c5a4f339611a15cca61bfdd.tar.bz2 |
Use CmpInst::Predicate instead of 'unsigned short' in some places. NFC
llvm-svn: 255623
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index fb04aa5..4ae2fd5 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -3282,9 +3282,8 @@ AddrSpaceCastInst::AddrSpaceCastInst( void CmpInst::anchor() {} -CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, - Value *LHS, Value *RHS, const Twine &Name, - Instruction *InsertBefore) +CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS, + Value *RHS, const Twine &Name, Instruction *InsertBefore) : Instruction(ty, op, OperandTraits<CmpInst>::op_begin(this), OperandTraits<CmpInst>::operands(this), @@ -3295,9 +3294,8 @@ CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, setName(Name); } -CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, - Value *LHS, Value *RHS, const Twine &Name, - BasicBlock *InsertAtEnd) +CmpInst::CmpInst(Type *ty, OtherOps op, Predicate predicate, Value *LHS, + Value *RHS, const Twine &Name, BasicBlock *InsertAtEnd) : Instruction(ty, op, OperandTraits<CmpInst>::op_begin(this), OperandTraits<CmpInst>::operands(this), @@ -3309,8 +3307,7 @@ CmpInst::CmpInst(Type *ty, OtherOps op, unsigned short predicate, } CmpInst * -CmpInst::Create(OtherOps Op, unsigned short predicate, - Value *S1, Value *S2, +CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2, const Twine &Name, Instruction *InsertBefore) { if (Op == Instruction::ICmp) { if (InsertBefore) @@ -3330,7 +3327,7 @@ CmpInst::Create(OtherOps Op, unsigned short predicate, } CmpInst * -CmpInst::Create(OtherOps Op, unsigned short predicate, Value *S1, Value *S2, +CmpInst::Create(OtherOps Op, Predicate predicate, Value *S1, Value *S2, const Twine &Name, BasicBlock *InsertAtEnd) { if (Op == Instruction::ICmp) { return new ICmpInst(*InsertAtEnd, CmpInst::Predicate(predicate), @@ -3531,7 +3528,7 @@ CmpInst::Predicate CmpInst::getSignedPredicate(Predicate pred) { } } -bool CmpInst::isUnsigned(unsigned short predicate) { +bool CmpInst::isUnsigned(Predicate predicate) { switch (predicate) { default: return false; case ICmpInst::ICMP_ULT: case ICmpInst::ICMP_ULE: case ICmpInst::ICMP_UGT: @@ -3539,7 +3536,7 @@ bool CmpInst::isUnsigned(unsigned short predicate) { } } -bool CmpInst::isSigned(unsigned short predicate) { +bool CmpInst::isSigned(Predicate predicate) { switch (predicate) { default: return false; case ICmpInst::ICMP_SLT: case ICmpInst::ICMP_SLE: case ICmpInst::ICMP_SGT: @@ -3547,7 +3544,7 @@ bool CmpInst::isSigned(unsigned short predicate) { } } -bool CmpInst::isOrdered(unsigned short predicate) { +bool CmpInst::isOrdered(Predicate predicate) { switch (predicate) { default: return false; case FCmpInst::FCMP_OEQ: case FCmpInst::FCMP_ONE: case FCmpInst::FCMP_OGT: @@ -3556,7 +3553,7 @@ bool CmpInst::isOrdered(unsigned short predicate) { } } -bool CmpInst::isUnordered(unsigned short predicate) { +bool CmpInst::isUnordered(Predicate predicate) { switch (predicate) { default: return false; case FCmpInst::FCMP_UEQ: case FCmpInst::FCMP_UNE: case FCmpInst::FCMP_UGT: @@ -3565,7 +3562,7 @@ bool CmpInst::isUnordered(unsigned short predicate) { } } -bool CmpInst::isTrueWhenEqual(unsigned short predicate) { +bool CmpInst::isTrueWhenEqual(Predicate predicate) { switch(predicate) { default: return false; case ICMP_EQ: case ICMP_UGE: case ICMP_ULE: case ICMP_SGE: case ICMP_SLE: @@ -3573,7 +3570,7 @@ bool CmpInst::isTrueWhenEqual(unsigned short predicate) { } } -bool CmpInst::isFalseWhenEqual(unsigned short predicate) { +bool CmpInst::isFalseWhenEqual(Predicate predicate) { switch(predicate) { case ICMP_NE: case ICMP_UGT: case ICMP_ULT: case ICMP_SGT: case ICMP_SLT: case FCMP_FALSE: case FCMP_ONE: case FCMP_OGT: case FCMP_OLT: return true; |