diff options
author | Chris Lattner <sabre@nondot.org> | 2010-06-26 21:52:32 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-06-26 21:52:32 +0000 |
commit | 7f215c12af4c3e7f81b24102a676aabfdb4e1566 (patch) | |
tree | 55a24deb60276747a4c968a7c9b69accef36f761 /lib/CodeGen/CGExpr.cpp | |
parent | 9a20723df5904f2da9e4da14bf127366609b5cd8 (diff) |
use more efficient type comparison predicates.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExpr.cpp')
-rw-r--r-- | lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 5e84ffc06d..1484334edc 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -427,7 +427,7 @@ EmitScalarPrePostIncDec(const UnaryOperator *E, LValue LV, NextVal = Builder.CreateGEP(NextVal, Inc, "ptrincdec"); NextVal = Builder.CreateBitCast(NextVal, InVal->getType()); } - } else if (InVal->getType() == llvm::Type::getInt1Ty(VMContext) && isInc) { + } else if (InVal->getType()->isIntegerTy(1) && isInc) { // Bool++ is an interesting case, due to promotion rules, we get: // Bool++ -> Bool = Bool+1 -> Bool = (int)Bool+1 -> // Bool = ((int)Bool+1) != 0 |