From: Simon Atanasyan Date: Wed, 23 Apr 2014 11:10:55 +0000 (+0000) Subject: [yaml2obj][ELF] Add a virtual destructor to the ELFYAML::Section class X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e8276ef4180eef001cbc502148b673b848433828;p=oota-llvm.git [yaml2obj][ELF] Add a virtual destructor to the ELFYAML::Section class to prevent memory leaks. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206969 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Object/ELFYAML.h b/include/llvm/Object/ELFYAML.h index 38707776abe..26bfaaed6da 100644 --- a/include/llvm/Object/ELFYAML.h +++ b/include/llvm/Object/ELFYAML.h @@ -79,6 +79,7 @@ struct Section { StringRef Info; llvm::yaml::Hex64 AddressAlign; Section(SectionKind Kind) : Kind(Kind) {} + virtual ~Section(); }; struct RawContentSection : Section { object::yaml::BinaryRef Content; diff --git a/lib/Object/ELFYAML.cpp b/lib/Object/ELFYAML.cpp index 59d9c06f370..f7ba237883a 100644 --- a/lib/Object/ELFYAML.cpp +++ b/lib/Object/ELFYAML.cpp @@ -14,6 +14,9 @@ #include "llvm/Object/ELFYAML.h" namespace llvm { + +ELFYAML::Section ::~Section() {} + namespace yaml { void