Fix for PR3150: obvious copy-paste bug in
ScalarExprEmitter::VisitBinLOr. llvm-svn: 60415
This commit is contained in:
		
							parent
							
								
									9af949105a
								
							
						
					
					
						commit
						e918435f94
					
				| 
						 | 
				
			
			@ -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");
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -0,0 +1,4 @@
 | 
			
		|||
// RUN: clang -emit-llvm -o - %s | grep "store i32 1"
 | 
			
		||||
// PR3150
 | 
			
		||||
 | 
			
		||||
int a() {return 1||1;}
 | 
			
		||||
		Loading…
	
		Reference in New Issue