[PATCH] Factor the Unit section parsing into the DWARFUnitSection class.

Alexey Samsonov vonosmas at gmail.com
Fri Oct 3 17:19:08 PDT 2014


================
Comment at: lib/DebugInfo/DWARFUnit.h:39
@@ -38,1 +38,3 @@
 
+  void parse(DWARFContext &C, StringRef SectionData, const RelocAddrMap &Map);
+  void parseDWO(DWARFContext &C, StringRef SectionData, const RelocAddrMap &Map);
----------------
friss wrote:
> samsonov wrote:
> > Can these methods take const DWARFContext::Section & instead of StringRef/RelocAddrMap ?
> Nope because you can't forward declare nested structs and including DWARFContext.h in DWARFUnit.h isn't possible (circular dependency). We could unnest the Section struct from the Context object to allow this.
Yes. I think it's fine to commit this change as is, and then hoist Section (essentially, StringRef/RelocAddrMap pair) from DWARFContext and pass it here in a small follow-up change. Thanks!

http://reviews.llvm.org/D5522






More information about the llvm-commits mailing list