[llvm] r217747 - Introduce the DWARFUnitSection abstraction.
Frédéric Riss
friss at apple.com
Mon Sep 15 03:23:35 PDT 2014
> On 15 Sep 2014, at 12:07, Chandler Carruth <chandlerc at google.com> wrote:
>
>
> On Mon, Sep 15, 2014 at 2:58 AM, Frédéric Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
>> On 15 Sep 2014, at 11:51, Chandler Carruth <chandlerc at google.com <mailto:chandlerc at google.com>> wrote:
>>
>>
>> On Mon, Sep 15, 2014 at 12:50 AM, Frederic Riss <friss at apple.com <mailto:friss at apple.com>> wrote:
>> +/// Base class for all DWARFUnitSection classes. This provides the
>> +/// functionality common to all unit types.
>> +class DWARFUnitSectionBase {
>> +public:
>> + /// Returns the Unit that contains the given section offset in the
>> + /// same section this Unit originated from.
>> + virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0;
>>
>> This, through every instantiation of the below template:
>>
>> +};
>> +
>> +/// Concrete instance of DWARFUnitSection, specialized for one Unit type.
>> +template<typename UnitType>
>> +class DWARFUnitSection : public SmallVector<std::unique_ptr<UnitType>, 1>,
>> + public DWARFUnitSectionBase {
>>
>> Is causing *massive* spews of warnings. =/
>
> Sorry about that, I’m not seeing anything here… what kind of warnings? There was an ambiguous type aliasing issue that I corrected in r217751 (only diagnosed by GCC btw).
>
> ../lib/DebugInfo/DWARFUnit.h:33:7: warning: 'llvm::DWARFUnitSectionBase' has virtual functions but non-virtual destructor [-Wnon-virtual-dtor]
>
> Not sure if I have a busted compiler, but I'm self hosting with Clang...
This is obviously true, but I don’t see it with my system clang version, and I didn’t see it on any on the bots I looked at. Maybe it will show up in later bootstrap builds that will use trunk clang.
As I need pre-commit review to get the fix in, do you want me to revert the change now? I’ll submit the code removing the inheritance later today, but I can’t presume of the review time.
Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/393394fc/attachment.html>
More information about the llvm-commits
mailing list