From: Michael Liao Date: Wed, 2 Oct 2019 00:22:45 +0000 (+0000) Subject: Fix unused variable warning. NFCI. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=887365831e8c8b4f668fa58bf847ce3c633081d9;p=clang Fix unused variable warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373410 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGOpenMPRuntime.cpp b/lib/CodeGen/CGOpenMPRuntime.cpp index 7246138f9a..4da84f230e 100644 --- a/lib/CodeGen/CGOpenMPRuntime.cpp +++ b/lib/CodeGen/CGOpenMPRuntime.cpp @@ -7324,10 +7324,10 @@ private: return ElemSize; if (const Expr *LenExpr = OAE->getLength()) { - llvm::Value *LengthVal = CGF.EmitScalarExpr(OAE->getLength()); - LengthVal = CGF.EmitScalarConversion( - LengthVal, OAE->getLength()->getType(), - CGF.getContext().getSizeType(), OAE->getLength()->getExprLoc()); + llvm::Value *LengthVal = CGF.EmitScalarExpr(LenExpr); + LengthVal = CGF.EmitScalarConversion(LengthVal, LenExpr->getType(), + CGF.getContext().getSizeType(), + LenExpr->getExprLoc()); return CGF.Builder.CreateNUWMul(LengthVal, ElemSize); } assert(!OAE->getLength() && OAE->getColonLoc().isValid() &&