summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 40c714ec82d..146f307a55a 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -236,12 +236,11 @@ ConstantExpr::ConstantExpr(Constant *C, const std::vector<Constant*> &IdxList,
// classof implementations
bool ConstantIntegral::classof(const Constant *CPV) {
- return (CPV->getType()->isIntegral() || CPV->getType() == Type::BoolTy) &&
- !isa<ConstantExpr>(CPV);
+ return CPV->getType()->isIntegral() && !isa<ConstantExpr>(CPV);
}
bool ConstantInt::classof(const Constant *CPV) {
- return CPV->getType()->isIntegral() && !isa<ConstantExpr>(CPV);
+ return CPV->getType()->isInteger() && !isa<ConstantExpr>(CPV);
}
bool ConstantSInt::classof(const Constant *CPV) {
return CPV->getType()->isSigned() && !isa<ConstantExpr>(CPV);
OpenPOWER on IntegriCloud