diff options
Diffstat (limited to 'lib/CodeGen/CGExprScalar.cpp')
-rw-r--r-- | lib/CodeGen/CGExprScalar.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index 6ceb2a6790..05573d6aec 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -719,8 +719,8 @@ Value *ScalarExprEmitter::VisitUnaryLNot(const UnaryOperator *E) { // the operand is an icmp ne, turn into icmp eq. BoolVal = Builder.CreateNot(BoolVal, "lnot"); - // ZExt result to int. - return Builder.CreateZExt(BoolVal, CGF.LLVMIntTy, "lnot.ext"); + // ZExt result to the expr type. + return Builder.CreateZExt(BoolVal, ConvertType(E->getType()), "lnot.ext"); } /// VisitSizeOfAlignOfExpr - Return the size or alignment of the type of |