[llvm] r217990 - Reapply fix in r217988 (reverted in r217989) and remove the alternative fix committed in r217987.
David Blaikie
dblaikie at gmail.com
Wed Sep 17 15:27:36 PDT 2014
Author: dblaikie
Date: Wed Sep 17 17:27:36 2014
New Revision: 217990
URL: http://llvm.org/viewvc/llvm-project?rev=217990&view=rev
Log:
Reapply fix in r217988 (reverted in r217989) and remove the alternative fix committed in r217987.
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.
Modified:
llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h
llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
Modified: llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h?rev=217990&r1=217989&r2=217990&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/SimplifyLibCalls.h Wed Sep 17 17:27:36 2014
@@ -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
Modified: llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp?rev=217990&r1=217989&r2=217990&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstructionCombining.cpp Wed Sep 17 17:27:36 2014
@@ -2908,7 +2908,7 @@ bool InstCombiner::DoOneIteration(Functi
}
namespace {
-class InstCombinerLibCallSimplifier : public LibCallSimplifier {
+class InstCombinerLibCallSimplifier final : public LibCallSimplifier {
InstCombiner *IC;
public:
InstCombinerLibCallSimplifier(const DataLayout *DL,
More information about the llvm-commits
mailing list