[llvm] 6df09d6 - [SampleFDO] Fix -Wnon-virtual-dtor

Rong Xu via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 3 12:21:50 PDT 2021


Author: Rong Xu
Date: 2021-09-03T12:20:53-07:00
New Revision: 6df09d6ccbc0cb72d3278cafb592e9bc0e6b84a1

URL: https://github.com/llvm/llvm-project/commit/6df09d6ccbc0cb72d3278cafb592e9bc0e6b84a1
DIFF: https://github.com/llvm/llvm-project/commit/6df09d6ccbc0cb72d3278cafb592e9bc0e6b84a1.diff

LOG: [SampleFDO] Fix -Wnon-virtual-dtor

Make the dtor virtual to fix the warning.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
index 2a510e69cf45f..1cef5e73cdd2a 100644
--- a/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
+++ b/llvm/include/llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h
@@ -114,7 +114,7 @@ template <typename BT> class SampleProfileLoaderBaseImpl {
       DenseMap<const BasicBlockT *, SmallVector<const BasicBlockT *, 8>>;
 
 protected:
-  ~SampleProfileLoaderBaseImpl() = default;
+  virtual ~SampleProfileLoaderBaseImpl() = default;
   friend class SampleCoverageTracker;
 
   Function &getFunction(FunctionT &F) {


        


More information about the llvm-commits mailing list