]> granicus.if.org Git - clang/commitdiff
Fix unused variable warning. NFCI.
authorMichael Liao <michael.hliao@gmail.com>
Wed, 2 Oct 2019 00:22:45 +0000 (00:22 +0000)
committerMichael Liao <michael.hliao@gmail.com>
Wed, 2 Oct 2019 00:22:45 +0000 (00:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@373410 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGOpenMPRuntime.cpp

index 7246138f9aa3837d8bf1534628d07776798a1464..4da84f230ec1e70a5d81bb392e193d4b890abc0a 100644 (file)
@@ -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() &&