[llvm] ba2aa5f - [SampleFDO] Provide a virtual desructor for SampleProfileLoaderBaseImpl
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 16 13:17:50 PST 2021
Author: Kazu Hirata
Date: 2021-02-16T13:17:33-08:00
New Revision: ba2aa5f49ebbe28ad2dbf0c5bea451f0ebf436c6
URL: https://github.com/llvm/llvm-project/commit/ba2aa5f49ebbe28ad2dbf0c5bea451f0ebf436c6
DIFF: https://github.com/llvm/llvm-project/commit/ba2aa5f49ebbe28ad2dbf0c5bea451f0ebf436c6.diff
LOG: [SampleFDO] Provide a virtual desructor for SampleProfileLoaderBaseImpl
This patch fixes a warning:
llvm-project/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h:69:7:
error: 'llvm::SampleProfileLoaderBaseImpl' has virtual functions but
non-virtual destructor [-Werror,-Wnon-virtual-dtor]
Differential Revision: https://reviews.llvm.org/D96810
Added:
Modified:
llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h b/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
index f02bacb6edc3..03454962dabe 100644
--- a/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
+++ b/llvm/include/llvm/ProfileData/SampleProfileLoaderBaseImpl.h
@@ -69,6 +69,7 @@ extern cl::opt<bool> NoWarnSampleUnused;
class SampleProfileLoaderBaseImpl {
public:
SampleProfileLoaderBaseImpl(std::string Name) : Filename(Name) {}
+ virtual ~SampleProfileLoaderBaseImpl() = default;
void dump() { Reader->dump(); }
protected:
More information about the llvm-commits
mailing list