This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Add virtual destructor to base class to avoid warning
Needs ReviewPublic

Authored by carlo.bertolli on Apr 7 2017, 8:29 AM.

Details

Reviewers
kcc
krasin
rnk
Summary

Building with -Werror results in the following report on PPC64 (since last night NY timezone):

../src/projects/compiler-rt/lib/xray/../sanitizer_common/sanitizer_flag_parser.h:23:7: error: '__sanitizer::FlagHandlerBase' has virtual functions but non-virtual destructor [-Werror,-Wnon-virtual-dtor]

I am adding a virtual destructor to the base class, but I am happy to do anything better than that.

Diff Detail

Repository
rL LLVM

Event Timeline

carlo.bertolli created this revision.Apr 7 2017, 8:29 AM
rnk edited edge metadata.Apr 10 2017, 1:11 PM

No, this has already landed and been reverted once:

commit d6944a2ff309db0b60216c65708f65c18d5cb8c7
Author: Ivan Krasin <krasin@chromium.org>
Date:   Thu Apr 6 18:22:25 2017 +0000

    Revert r299672: Add a virtual destructor to a class with virtual methods.

    Reason: breaks sanitizers builds.

    Original Differential Revision: https://reviews.llvm.org/D317

Notes:
    git-svn-rev: 299679

commit 7a21a8532432c1f2f183ac2d1089bdb2ff6950eb
Author: Ivan Krasin <krasin@chromium.org>
Date:   Thu Apr 6 17:58:45 2017 +0000

    Add a virtual destructor to a class with virtual methods.

    Summary:
    Recently, Clang enabled the check for virtual destructors
    in the presence of virtual methods. That broke the bootstrap
    build. Fixing it.

    Reviewers: pcc

    Reviewed By: pcc

    Subscribers: llvm-commits, kubamracek

    Differential Revision: https://reviews.llvm.org/D31776

Notes:
    git-svn-rev: 299672
rnk added a reviewer: krasin.Apr 10 2017, 1:11 PM

Just curious, why was this reverted? Is it an ABI issue?