From db50547fd526329d00fa1fee4e7ac90f2624c6e0 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@112943 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprScalar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExprScalar.cpp') diff --git a/lib/CodeGen/CGExprScalar.cpp b/lib/CodeGen/CGExprScalar.cpp index fd77a67606..4e16f66ba4 100644 --- a/lib/CodeGen/CGExprScalar.cpp +++ b/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