[llvm] 588ffda - [polly] Fix compiler warning. NFC.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon May 16 15:50:26 PDT 2022
is the virtual dtor used/needed? (are instances of this class ever
destroyed polymorphically)
If not, this type could be marked `final` and leaving the dtor non-virtual.
On Mon, May 9, 2022 at 12:06 PM Michael Kruse via llvm-commits
<llvm-commits at lists.llvm.org> wrote:
>
>
> Author: Michael Kruse
> Date: 2022-05-09T14:04:40-05:00
> New Revision: 588ffdaf376a191ddcf106c29462f156fa8bdce5
>
> URL: https://github.com/llvm/llvm-project/commit/588ffdaf376a191ddcf106c29462f156fa8bdce5
> DIFF: https://github.com/llvm/llvm-project/commit/588ffdaf376a191ddcf106c29462f156fa8bdce5.diff
>
> LOG: [polly] Fix compiler warning. NFC.
>
> Fix the warning
>
> warning: 'polly::ScopViewer' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
>
> and for several other classes by inserting virtual destructors.
>
> Added:
>
>
> Modified:
> llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
>
> Removed:
>
>
>
> ################################################################################
> diff --git a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
> index dac2b2233ff7..24b8813e9b73 100644
> --- a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
> +++ b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
> @@ -44,6 +44,7 @@ struct DOTGraphTraitsViewer
> : public PassInfoMixin<DOTGraphTraitsViewer<AnalysisT, IsSimple, GraphT,
> AnalysisGraphTraitsT>> {
> DOTGraphTraitsViewer(StringRef GraphName) : Name(GraphName) {}
> + virtual ~DOTGraphTraitsViewer() {}
>
> /// Return true if this function should be processed.
> ///
> @@ -98,6 +99,7 @@ struct DOTGraphTraitsPrinter
> : public PassInfoMixin<DOTGraphTraitsPrinter<AnalysisT, IsSimple, GraphT,
> AnalysisGraphTraitsT>> {
> DOTGraphTraitsPrinter(StringRef GraphName) : Name(GraphName) {}
> + virtual ~DOTGraphTraitsPrinter() {}
>
> /// Return true if this function should be processed.
> ///
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list