<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 15 Sep 2014, at 11:51, Chandler Carruth <<a href="mailto:chandlerc@google.com" class="">chandlerc@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Mon, Sep 15, 2014 at 12:50 AM, Frederic Riss <span dir="ltr" class=""><<a href="mailto:friss@apple.com" target="_blank" class="">friss@apple.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2l3" class="a3s" style="overflow:hidden">+/// Base class for all DWARFUnitSection classes. This provides the<br class="">
+/// functionality common to all unit types.<br class="">
+class DWARFUnitSectionBase {<br class="">
+public:<br class="">
+  /// Returns the Unit that contains the given section offset in the<br class="">
+  /// same section this Unit originated from.<br class="">
+  virtual DWARFUnit *getUnitForOffset(uint32_t Offset) const = 0;<br class=""></div></blockquote><div class=""><br class=""></div><div class="">This, through every instantiation of the below template:</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":2l3" class="a3s" style="overflow:hidden">
+};<br class="">
+<br class="">
+/// Concrete instance of DWARFUnitSection, specialized for one Unit type.<br class="">
+template<typename UnitType><br class="">
+class DWARFUnitSection : public SmallVector<std::unique_ptr<UnitType>, 1>,<br class="">
+                         public DWARFUnitSectionBase {</div></blockquote></div><br class="">Is causing *massive* spews of warnings. =/</div></div></div></blockquote><div><br class=""></div><div>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).</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra">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.</div></div>
</div></blockquote></div><br class=""><div class="">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.</div><div class=""><br class=""></div><div class="">Fred</div></body></html>