<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Sep 15, 2014 at 3:38 AM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: friss<br>
Date: Mon Sep 15 05:38:13 2014<br>
New Revision: 217756<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=217756&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=217756&view=rev</a><br>
Log:<br>
Fix a non-virtual destructor warning introduced in r217747.<br>
<br>
Modified:<br>
    llvm/trunk/lib/DebugInfo/DWARFUnit.h<br>
<br>
Modified: llvm/trunk/lib/DebugInfo/DWARFUnit.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFUnit.h?rev=217756&r1=217755&r2=217756&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFUnit.h?rev=217756&r1=217755&r2=217756&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/DebugInfo/DWARFUnit.h (original)<br>
+++ llvm/trunk/lib/DebugInfo/DWARFUnit.h Mon Sep 15 05:38:13 2014<br>
@@ -35,6 +35,8 @@ public:<br>
   /// Returns the Unit that contains the given section offset in the<br>
   /// same section this Unit originated from.<br>
   virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0;<br>
+<br>
+  virtual ~DWARFUnitSectionBase() {}<br></blockquote><div><br></div><div>Since these objects are never polymorphically owned, a better fix for this would be to make the base dtor protected, and the derived classes final. That will satisfy the warning without adding an unneeded vtable entry/virtual call overhead.<br><br>- David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 };<br>
<br>
 /// Concrete instance of DWARFUnitSection, specialized for one Unit type.<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>