[llvm-commits] [llvm] r116766 - /llvm/trunk/include/llvm/MC/MCObjectFormat.h

Bill Wendling wendling at apple.com
Tue Oct 19 02:39:33 PDT 2010


On Oct 18, 2010, at 5:39 PM, Chandler Carruth wrote:

> On Mon, Oct 18, 2010 at 5:25 PM, Bill Wendling <wendling at apple.com> wrote:
> 
> On Oct 18, 2010, at 4:52 PM, Chandler Carruth wrote:
> 
>> On Mon, Oct 18, 2010 at 4:47 PM, Bill Wendling <wendling at apple.com> wrote:
>> On Oct 18, 2010, at 4:18 PM, Chandler Carruth wrote:
>> 
>> > Author: chandlerc
>> > Date: Mon Oct 18 18:18:51 2010
>> > New Revision: 116766
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=116766&view=rev
>> > Log:
>> > Add a virtual destructor to silence a GCC warning.
>> >
>> > Modified:
>> >    llvm/trunk/include/llvm/MC/MCObjectFormat.h
>> >
>> > Modified: llvm/trunk/include/llvm/MC/MCObjectFormat.h
>> > URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCObjectFormat.h?rev=116766&r1=116765&r2=116766&view=diff
>> > ==============================================================================
>> > --- llvm/trunk/include/llvm/MC/MCObjectFormat.h (original)
>> > +++ llvm/trunk/include/llvm/MC/MCObjectFormat.h Mon Oct 18 18:18:51 2010
>> > @@ -15,6 +15,8 @@
>> >
>> > class MCObjectFormat {
>> > public:
>> > +  virtual ~MCObjectFormat() {}
>> > +
>> 
>> Hi Chandler,
>> 
>> Should the definition for this go in the MCObjectFormat.cpp file to "anchor" the vtable?
>> 
>> I wasn't sure. I placed it here as that seemed like the minimal change from the original code (it is an abstract interface afterall). I'm happy to move it to the cpp file if anchoring the vtable (and forcing this call to be out-of-line) is desirable.
> 
> As long as it complies with http://llvm.org/docs/CodingStandards.html#ll_virtual_anch it will be okay. :)
> 
> Hadn't realized we had a formal policy on it, thanks. Fixed in r116779. 
> 
Thanks! :-)

-bw



More information about the llvm-commits mailing list