[llvm] ea31a17 - [AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 24 17:10:53 PDT 2023


Not sure if this is better than the traditional void casts?

But if it is, maybe we should have a style guide discussion/authoritative
suggestion about it? (& probably the sort of thing where a mass cleanup
wouldn't be too bad - not sure anyone would much care about the blame lines
on the existing void casts... )

On Thu, Apr 13, 2023 at 12:41 PM Fangrui Song via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Fangrui Song
> Date: 2023-04-13T12:40:55-07:00
> New Revision: ea31a17dbec14363d8fe141128067db453befdc2
>
> URL:
> https://github.com/llvm/llvm-project/commit/ea31a17dbec14363d8fe141128067db453befdc2
> DIFF:
> https://github.com/llvm/llvm-project/commit/ea31a17dbec14363d8fe141128067db453befdc2.diff
>
> LOG: [AArch64] Fix -Wunused-variable in -DLLVM_ENABLE_ASSERTIONS=off builds
>
> Added:
>
>
> Modified:
>     llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
> b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
> index 4b4f8c7f62cd..92eee316eae8 100644
> --- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
> +++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
> @@ -22217,7 +22217,7 @@ static void replaceBoolVectorBitcast(SDNode *N,
>    SDLoc DL(N);
>    SDValue Op = N->getOperand(0);
>    EVT VT = N->getValueType(0);
> -  EVT SrcVT = Op.getValueType();
> +  [[maybe_unused]] EVT SrcVT = Op.getValueType();
>    assert(SrcVT.isVector() && SrcVT.getVectorElementType() == MVT::i1 &&
>           "Must be bool vector.");
>
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230424/00593e3a/attachment.html>


More information about the llvm-commits mailing list