From 887365831e8c8b4f668fa58bf847ce3c633081d9 Mon Sep 17 00:00:00 2001 From: Michael Liao Date: Wed, 2 Oct 2019 00:22:45 +0000 Subject: [PATCH] Fix unused variable warning. NFCI. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373410 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGOpenMPRuntime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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() && -- 2.40.0