[llvm] ee11bf3 - [Hexagon] Silence unused function warning with gcc10, NFC

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 6 08:19:43 PST 2021


Ah, makes sense-  thanks!

On Wed, Jan 6, 2021 at 7:48 AM Krzysztof Parzyszek <kparzysz at quicinc.com>
wrote:

> This function (and one more like it) cannot be a non-member (not without
> adding extra parameters to it).  I did wrap them in ifndef NDEBUG though in
> https://reviews.llvm.org/rG46975b5b29e2.
>
>
>
> --
>
> Krzysztof Parzyszek  kparzysz at quicinc.com   AI tools development
>
>
>
> *From:* David Blaikie <dblaikie at gmail.com>
> *Sent:* Tuesday, January 5, 2021 7:13 PM
> *To:* Krzysztof Parzyszek <kparzysz at quicinc.com>; Krzysztof Parzyszek <
> llvmlistbot at llvm.org>
> *Cc:* llvm-commits <llvm-commits at lists.llvm.org>
> *Subject:* [EXT] Re: [llvm] ee11bf3 - [Hexagon] Silence unused function
> warning with gcc10, NFC
>
>
>
> FWIW, I'd suggest making this a non-member if possible, and wrapping it in
> an #ifndef NDEBUG as a lot of other debug/assert helper code is written.
>
>
>
> On Tue, Jan 5, 2021 at 12:12 PM Krzysztof Parzyszek via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Krzysztof Parzyszek
> Date: 2021-01-05T14:11:45-06:00
> New Revision: ee11bf316f6be9dba29026b332fcde1dc3be4f9d
>
> URL:
> https://github.com/llvm/llvm-project/commit/ee11bf316f6be9dba29026b332fcde1dc3be4f9d
> DIFF:
> https://github.com/llvm/llvm-project/commit/ee11bf316f6be9dba29026b332fcde1dc3be4f9d.diff
>
> LOG: [Hexagon] Silence unused function warning with gcc10, NFC
>
> Added:
>
>
> Modified:
>     llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
> b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
> index 056a5a83a0a6..05269d37f812 100644
> --- a/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
> +++ b/llvm/lib/Target/Hexagon/HexagonVectorCombine.cpp
> @@ -118,7 +118,7 @@ class HexagonVectorCombine {
>
>  private:
>    bool isByteVecTy(Type *Ty) const;
> -  bool isSectorTy(Type *Ty) const;
> +  bool isSectorTy(Type *Ty) const LLVM_ATTRIBUTE_UNUSED;
>    Value *getElementRange(IRBuilder<> &Builder, Value *Lo, Value *Hi, int
> Start,
>                           int Length) const;
>  };
>
>
>
> _______________________________________________
> 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/20210106/2f383feb/attachment.html>


More information about the llvm-commits mailing list