mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-14 07:09:08 +00:00
Add virtual destructor to WasmYAML::Section or avoid memory leak
Tested locally with -DLLVM_USE_SANITIZER=Address Differential Revision: https://reviews.llvm.org/D31551 Patch by Sam Clegg llvm-svn: 299270
This commit is contained in:
parent
b5a9d6bfb3
commit
e5945bcdb2
@ -108,6 +108,7 @@ struct Signature {
|
||||
|
||||
struct Section {
|
||||
Section(SectionType SecType) : Type(SecType) {}
|
||||
virtual ~Section();
|
||||
|
||||
SectionType Type;
|
||||
std::vector<Relocation> Relocations;
|
||||
|
@ -17,6 +17,15 @@
|
||||
#include "llvm/Support/MipsABIFlags.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
namespace WasmYAML {
|
||||
|
||||
// Declared here rather than in the header to comply with:
|
||||
// http://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
|
||||
Section::~Section() {}
|
||||
|
||||
} // end namespace WasmYAML
|
||||
|
||||
namespace yaml {
|
||||
|
||||
void MappingTraits<WasmYAML::FileHeader>::mapping(
|
||||
|
Loading…
Reference in New Issue
Block a user