This type isn't owned polymorphically (as demonstrated by making the
dtor protected and everything still compiling) so just address the
warning by protecting the base dtor and making the derived class final.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217990
91177308-0d34-0410-b5e6-
96231b3b80d8
const TargetLibraryInfo *TLI;
bool UnsafeFPShrink;
+protected:
+ ~LibCallSimplifier() {}
+
public:
LibCallSimplifier(const DataLayout *TD, const TargetLibraryInfo *TLI,
bool UnsafeFPShrink);
- /// ~LibCallSimplifier - Adding the virtual destructor back in to satisfy
- /// -Wnon-virtual-dtor. This class is used polymorphically by InstCombine.
- virtual ~LibCallSimplifier() {}
-
/// optimizeCall - Take the given call instruction and return a more
/// optimal value to replace the instruction with or 0 if a more
/// optimal form can't be found. Note that the returned value may
}
namespace {
-class InstCombinerLibCallSimplifier : public LibCallSimplifier {
+class InstCombinerLibCallSimplifier final : public LibCallSimplifier {
InstCombiner *IC;
public:
InstCombinerLibCallSimplifier(const DataLayout *DL,