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 | fa20e95043d754afe785530803a24bd1dad76d5f (patch) | |
| tree | e5537c65fa7095d2e880dc139f39c1efbfd393dc /clang/lib/CodeGen/CGExpr.cpp | |
| parent | 0bf27620f0cd12ba436ae698645cce079611cfb2 (diff) | |
| download | bcm5719-llvm-fa20e95043d754afe785530803a24bd1dad76d5f.tar.gz bcm5719-llvm-fa20e95043d754afe785530803a24bd1dad76d5f.zip | |
use more efficient type comparison predicates.
llvm-svn: 106958
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp index 5e84ffc06dc..1484334edc0 100644 --- a/clang/lib/CodeGen/CGExpr.cpp +++ b/clang/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 |

