[llvm-commits] [llvm] r95526 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h

Duncan Sands baldrick at free.fr
Sun Feb 7 13:09:22 PST 2010


Author: baldrick
Date: Sun Feb  7 15:09:22 2010
New Revision: 95526

URL: http://llvm.org/viewvc/llvm-project?rev=95526&view=rev
Log:
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.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h?rev=95526&r1=95525&r2=95526&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfPrinter.h Sun Feb  7 15:09:22 2010
@@ -33,6 +33,8 @@
 
 class DwarfPrinter {
 protected:
+  ~DwarfPrinter() {}
+
   //===-------------------------------------------------------------==---===//
   // Core attributes used by the DWARF printer.
   //





More information about the llvm-commits mailing list