[PATCH] D35004: [DWARF] - Add API to allow DWARFContextInMemory to delegate relocations handling to client.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 5 10:06:54 PDT 2017


dblaikie added inline comments.


================
Comment at: include/llvm/DebugInfo/DIContext.h:225-231
+  // Client may overload this method to perform relocations on its side.
+  //
+  // RelSec is a relocation section, client code is responsible for filling Map
+  // with relocated values. It that case method should return true, to say that
+  // client proccessed relocations and nothing else should be done on parser
+  // side. If method returns false (default), parser is responsible for
+  // performing relocations.
----------------
Three slashes for a doxy comment?


================
Comment at: include/llvm/DebugInfo/DIContext.h:232
+  // performing relocations.
+  virtual bool relocate(const object::SectionRef &RelSec,
+                        RelocAddrMap *Map) const {
----------------
Probably call this 'gatherRelocations' (since it doesn't actually modify the section, etc - but puts the relocations in the RelocAddrMap)


================
Comment at: include/llvm/DebugInfo/DIContext.h:233
+  virtual bool relocate(const object::SectionRef &RelSec,
+                        RelocAddrMap *Map) const {
+    return false;
----------------
Looks like 'Map' should be taken by reference rather than pointer (since it's never null)


https://reviews.llvm.org/D35004





More information about the llvm-commits mailing list