[llvm] 9e362e5 - Fix -Wunused-vairable on release build, NFC

Haojian Wu via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 8 13:58:22 PDT 2023


Author: Haojian Wu
Date: 2023-07-08T22:57:03+02:00
New Revision: 9e362e5e3fe0b7f85160c3a06e9c646e1c75e8e0

URL: https://github.com/llvm/llvm-project/commit/9e362e5e3fe0b7f85160c3a06e9c646e1c75e8e0
DIFF: https://github.com/llvm/llvm-project/commit/9e362e5e3fe0b7f85160c3a06e9c646e1c75e8e0.diff

LOG: Fix -Wunused-vairable on release build, NFC

Added: 
    

Modified: 
    llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
index 4eb47a98b458e9..5afc2515001da3 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -4949,8 +4949,8 @@ OpenMPIRBuilder::createAtomicRead(const LocationDescription &Loc,
   if (!updateToLocation(Loc))
     return Loc.IP;
 
-  Type *XTy = X.Var->getType();
-  assert(XTy->isPointerTy() && "OMP Atomic expects a pointer to target memory");
+  assert(X.Var->getType()->isPointerTy() &&
+         "OMP Atomic expects a pointer to target memory");
   Type *XElemTy = X.ElemTy;
   assert((XElemTy->isFloatingPointTy() || XElemTy->isIntegerTy() ||
           XElemTy->isPointerTy()) &&


        


More information about the llvm-commits mailing list