[llvm] 057fb81 - [IRBuilder] Fix -Wunused-variable in non-assertion build. NFC

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 14 22:14:48 PDT 2022


Author: Fangrui Song
Date: 2022-09-14T22:14:36-07:00
New Revision: 057fb8153ad61533d00939b77ea1c22edd2716c7

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

LOG: [IRBuilder] Fix -Wunused-variable in non-assertion build. NFC

Added: 
    

Modified: 
    llvm/lib/IR/IRBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp
index 8a46a71186c8..438d04fcadeb 100644
--- a/llvm/lib/IR/IRBuilder.cpp
+++ b/llvm/lib/IR/IRBuilder.cpp
@@ -716,6 +716,7 @@ CallInst *IRBuilderBase::CreateMaskedExpandLoad(Type *Ty, Value *Ptr,
   assert(PtrTy->isOpaqueOrPointeeTypeMatches(
              cast<FixedVectorType>(Ty)->getElementType()) &&
          "Wrong element type");
+  (void)PtrTy;
   assert(Mask && "Mask should not be all-ones (null)");
   if (!PassThru)
     PassThru = UndefValue::get(Ty);
@@ -738,6 +739,7 @@ CallInst *IRBuilderBase::CreateMaskedCompressStore(Value *Val, Value *Ptr,
   assert(PtrTy->isOpaqueOrPointeeTypeMatches(
              cast<FixedVectorType>(DataTy)->getElementType()) &&
          "Wrong element type");
+  (void)PtrTy;
   assert(Mask && "Mask should not be all-ones (null)");
   Type *OverloadedTypes[] = {DataTy};
   Value *Ops[] = {Val, Ptr, Mask};


        


More information about the llvm-commits mailing list