From 057fb8153ad61533d00939b77ea1c22edd2716c7 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 14 Sep 2022 22:14:36 -0700 Subject: [PATCH] [IRBuilder] Fix -Wunused-variable in non-assertion build. NFC --- llvm/lib/IR/IRBuilder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/IR/IRBuilder.cpp b/llvm/lib/IR/IRBuilder.cpp index 8a46a71186c89..438d04fcadeb4 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(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(DataTy)->getElementType()) && "Wrong element type"); + (void)PtrTy; assert(Mask && "Mask should not be all-ones (null)"); Type *OverloadedTypes[] = {DataTy}; Value *Ops[] = {Val, Ptr, Mask};