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/CGExprConstant.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/CGExprConstant.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CGExprConstant.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index a145a66b59b..d4c387796fe 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -908,7 +908,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, llvm::Constant *C = llvm::ConstantInt::get(VMContext, Result.Val.getInt()); - if (C->getType() == llvm::Type::getInt1Ty(VMContext)) { + if (C->getType()->isIntegerTy(1)) { const llvm::Type *BoolTy = getTypes().ConvertTypeForMem(E->getType()); C = llvm::ConstantExpr::getZExt(C, BoolTy); } @@ -955,7 +955,7 @@ llvm::Constant *CodeGenModule::EmitConstantExpr(const Expr *E, } llvm::Constant* C = ConstExprEmitter(*this, CGF).Visit(const_cast<Expr*>(E)); - if (C && C->getType() == llvm::Type::getInt1Ty(VMContext)) { + if (C && C->getType()->isIntegerTy(1)) { const llvm::Type *BoolTy = getTypes().ConvertTypeForMem(E->getType()); C = llvm::ConstantExpr::getZExt(C, BoolTy); } |

