[llvm] r238197 - Fix warning introduced in r238190 about lack of virtual destructor in MCObjectFileInfo.

David Blaikie dblaikie at gmail.com
Tue May 26 14:35:06 PDT 2015


On Tue, May 26, 2015 at 5:25 AM, Daniel Sanders <daniel.sanders at imgtec.com>
wrote:

> Author: dsanders
> Date: Tue May 26 07:25:36 2015
> New Revision: 238197
>
> URL: http://llvm.org/viewvc/llvm-project?rev=238197&view=rev
> Log:
> Fix warning introduced in r238190 about lack of virtual destructor in
> MCObjectFileInfo.
>
>
> Modified:
>     llvm/trunk/include/llvm/MC/MCObjectFileInfo.h
>
> Modified: llvm/trunk/include/llvm/MC/MCObjectFileInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectFileInfo.h?rev=238197&r1=238196&r2=238197&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/MC/MCObjectFileInfo.h (original)
> +++ llvm/trunk/include/llvm/MC/MCObjectFileInfo.h Tue May 26 07:25:36 2015
> @@ -188,6 +188,8 @@ protected:
>    MCSection *XDataSection;
>
>  public:
> +  virtual ~MCObjectFileInfo() { };
>

Are these objects actually destroyed polymorphically? If not, we should
make the dtor non-virtual and protected and the derived classes should be
final.


> +
>    void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM,
> CodeModel::Model CM,
>                              MCContext &ctx);
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150526/eb0b101e/attachment.html>


More information about the llvm-commits mailing list