[llvm] 588ffda - [polly] Fix compiler warning. NFC.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 12:06:11 PDT 2022


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.
   ///


        


More information about the llvm-commits mailing list