[llvm] r217747 - Introduce the DWARFUnitSection abstraction.

Frédéric Riss friss at apple.com
Mon Sep 15 02:58:43 PDT 2014


> On 15 Sep 2014, at 11:51, Chandler Carruth <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).

> And what is even going on here? Multiple inheritance between a SmallVector and something else??? This can't really be the right design? I'm very confused.

This is a new abstraction that replaces a previous SmallVector. The patch is minimal in the way that it didn’t require updating the previous users of the vector, but as said in the commit log, it is meant to be temporary. I’ll work on the replacement and back this totally out if I can’t gat it in soon enough.

Fred
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140915/cc677866/attachment.html>


More information about the llvm-commits mailing list