From 858a546d8fe73b07f2296313bef2e30445ea164b Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Mon, 15 Nov 2010 13:54:43 +0000 Subject: [PATCH] Silence an unused variable warning during release builds by folding the expression into the assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119143 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprCXX.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 137c54ab1e..66a07454ae 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -361,9 +361,8 @@ CodeGenFunction::EmitSynthesizedCXXCopyCtor(llvm::Value *Dest, if (E->requiresZeroInitialization()) EmitNullInitialization(Dest, E->getType()); - const ConstantArrayType *Array - = getContext().getAsConstantArrayType(E->getType()); - assert (!Array && "EmitSynthesizedCXXCopyCtor - Copied-in Array"); + assert(!getContext().getAsConstantArrayType(E->getType()) + && "EmitSynthesizedCXXCopyCtor - Copied-in Array"); EmitSynthesizedCXXCopyCtorCall(CD, Dest, Src, E->arg_begin(), E->arg_end()); } -- 2.40.0