[llvm] 0b533f2 - [IPO] Fix a warning

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 7 19:17:55 PDT 2025


Author: Kazu Hirata
Date: 2025-07-07T19:17:49-07:00
New Revision: 0b533f2d9f0551aaffb13dcac8e0fd0a952185b5

URL: https://github.com/llvm/llvm-project/commit/0b533f2d9f0551aaffb13dcac8e0fd0a952185b5
DIFF: https://github.com/llvm/llvm-project/commit/0b533f2d9f0551aaffb13dcac8e0fd0a952185b5.diff

LOG: [IPO] Fix a warning

This patch fixes:

  llvm/include/llvm/Transforms/IPO/Attributor.h:1233:3: error:
  'llvm::InformationCache' has virtual functions but non-virtual
  destructor [-Werror,-Wnon-virtual-dtor]

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/IPO/Attributor.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h
index 97876877ea67b..1c589fb944141 100644
--- a/llvm/include/llvm/Transforms/IPO/Attributor.h
+++ b/llvm/include/llvm/Transforms/IPO/Attributor.h
@@ -1230,7 +1230,7 @@ struct InformationCache {
           });
   }
 
-  ~InformationCache() {
+  virtual ~InformationCache() {
     // The FunctionInfo objects are allocated via a BumpPtrAllocator, we call
     // the destructor manually.
     for (auto &It : FuncInfoMap)


        


More information about the llvm-commits mailing list