diff --git a/include/llvm/Transforms/Utils/SimplifyLibCalls.h b/include/llvm/Transforms/Utils/SimplifyLibCalls.h index c7f5bb026c6..0780c74429e 100644 --- a/include/llvm/Transforms/Utils/SimplifyLibCalls.h +++ b/include/llvm/Transforms/Utils/SimplifyLibCalls.h @@ -36,14 +36,13 @@ private: 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 diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index 26f243cb150..ac0c01e3c7b 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -2908,7 +2908,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) { } namespace { -class InstCombinerLibCallSimplifier : public LibCallSimplifier { +class InstCombinerLibCallSimplifier final : public LibCallSimplifier { InstCombiner *IC; public: InstCombinerLibCallSimplifier(const DataLayout *DL,