From 3dc32ed569ab8f94e8036f5aae9d683c34bd31f3 Mon Sep 17 00:00:00 2001 From: Duncan Sands Date: Sun, 7 Feb 2010 21:09:22 +0000 Subject: [PATCH] Give DwarfPrinter a protected (but not virtual) destructor. Cppcheck warns about this base class not having a virtual destructor, but since this class has no virtual methods and neither it or the types derived from it has a destructor, a protected trivial destructor will do (and shuts cppcheck up) the trick without the cost of introducing a vtable. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95526 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/AsmPrinter/DwarfPrinter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/CodeGen/AsmPrinter/DwarfPrinter.h b/lib/CodeGen/AsmPrinter/DwarfPrinter.h index 19d08e28cdb..69d9c27ff0b 100644 --- a/lib/CodeGen/AsmPrinter/DwarfPrinter.h +++ b/lib/CodeGen/AsmPrinter/DwarfPrinter.h @@ -33,6 +33,8 @@ class Twine; class DwarfPrinter { protected: + ~DwarfPrinter() {} + //===-------------------------------------------------------------==---===// // Core attributes used by the DWARF printer. // -- 2.34.1