diff options
author | Teresa Johnson <tejohnson@google.com> | 2016-03-12 01:23:57 +0000 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2016-03-12 01:23:57 +0000 |
commit | 071509c22a642845da40773bf66411b65ac56bc9 (patch) | |
tree | 3b7e403d9f23b9926bb26b367b41908e1c803f04 | |
parent | 11e4c539f473aba9e09cab92fc1fdfb753b6a17e (diff) | |
download | bcm5719-llvm-071509c22a642845da40773bf66411b65ac56bc9.tar.gz bcm5719-llvm-071509c22a642845da40773bf66411b65ac56bc9.zip |
Fix a memory leak due to missing virtual destructors
Caused a couple of sanitizer bot failures in ThinLTO tests due to
r263275.
llvm-svn: 263317
-rw-r--r-- | llvm/include/llvm/IR/FunctionInfo.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/include/llvm/IR/FunctionInfo.h b/llvm/include/llvm/IR/FunctionInfo.h index 4cc01ccb0ba..81364b5e899 100644 --- a/llvm/include/llvm/IR/FunctionInfo.h +++ b/llvm/include/llvm/IR/FunctionInfo.h @@ -88,6 +88,8 @@ protected: : Kind(K), Linkage(Linkage) {} public: + virtual ~GlobalValueSummary() {} + /// Which kind of summary subclass this is. SummaryKind getSummaryKind() const { return Kind; } @@ -136,6 +138,7 @@ public: /// Summary constructors. FunctionSummary(GlobalValue::LinkageTypes Linkage, unsigned NumInsts) : GlobalValueSummary(FunctionKind, Linkage), InstCount(NumInsts) {} + virtual ~FunctionSummary() {} /// Check if this is a function summary. static bool classof(const GlobalValueSummary *GVS) { |