[llvm] ce9b72c - [NFC] Fix unused variable (used only in assert) after d1cdcddcc2ef712c4e2ab61c6e4ca83350e7e9e3

Jorge Gorbe Moya via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 4 14:15:49 PST 2023


Author: Jorge Gorbe Moya
Date: 2023-12-04T14:15:24-08:00
New Revision: ce9b72c9798680c9297de3f2a77f0a09303c06e5

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

LOG: [NFC] Fix unused variable (used only in assert) after d1cdcddcc2ef712c4e2ab61c6e4ca83350e7e9e3

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 d54da0267f7ed..8aab9a790f24a 100644
--- a/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp
@@ -5568,8 +5568,8 @@ OpenMPIRBuilder::createAtomicWrite(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