[llvm] r238197 - Fix warning introduced in r238190 about lack of virtual destructor in MCObjectFileInfo.
Daniel.Sanders at imgtec.com
Thu May 28 12:44:39 PDT 2015
> > > Are these objects actually destroyed polymorphically? If not, we should make the dtor non-virtual and protected and the derived classes should be final.
> > Sorry for the delay in replying to this. I had to revert r238197 and r238190 and I'm under time pressure to fix and re-commit.
> Yes, they're destroyed via a TargetLoweringObjectFile pointer.
> Were we not doing that before? Or did we not have derived classes before? Curious/confused.
MCObjectFileInfo didn't have a virtual destructor but didn't have virtual functions either. It's immediate subclass (TargetLoweringObjectFile) had a virtual destructor and virtual functions. My patch added a virtual function to MCObjectFileInfo which introduced the warning about having virtual functions without a virtual destructor.
More information about the llvm-commits