From 2f8df98c92e1b98aeb0b3a76a13f60ce8c438f0d Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 3 Sep 2010 02:07:00 +0000 Subject: IRgen: Fix silly thinko in r112021, which was generating code for the same expr twice. This showed up as an assert on the odd test case because we generated the decl map entry twice. llvm-svn: 112943 --- clang/lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/CodeGen') diff --git a/clang/lib/CodeGen/CGExprScalar.cpp b/clang/lib/CodeGen/CGExprScalar.cpp index fd77a67606b..4e16f66ba42 100644 --- a/clang/lib/CodeGen/CGExprScalar.cpp +++ b/clang/lib/CodeGen/CGExprScalar.cpp @@ -1033,7 +1033,7 @@ Value *ScalarExprEmitter::EmitCastExpr(CastExpr *CE) { // Handle conversion to bool correctly. if (DestTy->isBooleanType()) - return EmitScalarConversion(Visit(E), E->getType(), DestTy); + return EmitScalarConversion(Src, E->getType(), DestTy); return Builder.CreatePtrToInt(Src, ConvertType(DestTy)); } -- cgit v1.2.3