diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2008-12-02 16:02:46 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2008-12-02 16:02:46 +0000 |
| commit | 8de8d1d3f2e21e4a72ac294276930ad293a3a765 (patch) | |
| tree | 47e25162f6f3c45d69df0a60886b100bbbb0ed5f /lib/CodeGen/CGExprScalar.cpp | |
| parent | eb0646c8df1c5c8de62b622d13d0c9f19aa29277 (diff) | |
| download | clang-8de8d1d3f2e21e4a72ac294276930ad293a3a765.tar.gz clang-8de8d1d3f2e21e4a72ac294276930ad293a3a765.tar.bz2 clang-8de8d1d3f2e21e4a72ac294276930ad293a3a765.tar.xz | |
Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@60415 91177308-0d34-0410-b5e6-96231b3b80d8
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 8c4303b467..7f417b374a 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/lib/CodeGen/CGExprScalar.cpp @@ -1077,9 +1077,9 @@ Value *ScalarExprEmitter::VisitBinLOr(const BinaryOperator *E) { return Builder.CreateZExt(RHSCond, CGF.LLVMIntTy, "lor.ext"); } - // 1 || RHS: If it is safe, just elide the RHS, and return 0. + // 1 || RHS: If it is safe, just elide the RHS, and return 1. if (!CGF.ContainsLabel(E->getRHS())) - return llvm::Constant::getNullValue(CGF.LLVMIntTy); + return llvm::ConstantInt::get(CGF.LLVMIntTy, 1); } llvm::BasicBlock *ContBlock = CGF.createBasicBlock("lor.end"); |
