Skip to content

Commit 80bc38b

Browse files
committed
[RISCV] Silent a warning (NFC)
/llvm-project/clang/lib/CodeGen/Targets/RISCV.cpp:865:9: error: unused variable 'FixedSrcTy' [-Werror,-Wunused-variable] auto *FixedSrcTy = cast<llvm::FixedVectorType>(SrcTy); ^ 1 error generated.
1 parent 035f40e commit 80bc38b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/CodeGen/Targets/RISCV.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -862,7 +862,7 @@ llvm::Value *RISCVABIInfo::createCoercedLoad(Address Src, const ABIArgInfo &AI,
862862
if (auto *ArrayTy = dyn_cast<llvm::ArrayType>(SrcTy))
863863
SrcTy = ArrayTy->getElementType();
864864
Src = Src.withElementType(SrcTy);
865-
auto *FixedSrcTy = cast<llvm::FixedVectorType>(SrcTy);
865+
[[maybe_unused]] auto *FixedSrcTy = cast<llvm::FixedVectorType>(SrcTy);
866866
assert(ScalableDstTy->getElementType() == FixedSrcTy->getElementType());
867867
auto *Load = CGF.Builder.CreateLoad(Src);
868868
auto *VectorVal = llvm::PoisonValue::get(ScalableDstTy);

0 commit comments

Comments
 (0)