<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Jun 7, 2017 at 2:35 PM, Mehdi AMINI <span dir="ltr"><<a href="mailto:joker.eph@gmail.com" target="_blank">joker.eph@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_quote"><span><div>On Tue, Jun 6, 2017 at 3:26 PM Peter Collingbourne via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">pcc added inline comments.<br>
<br>
<br>
================<br>
Comment at: llvm/include/llvm/Object/IRSym<wbr>tab.h:123<br>
+/// Fills in Symtab and Strtab with a valid symbol and string table for Mods.<br>
+Error write(ArrayRef<Module *> Mods, SmallVector<char, 0> &Symtab,<br>
+            SmallVector<char, 0> &Strtab);<br>
----------------<br>
pcc wrote:<br>
> tejohnson wrote:<br>
> > The name "write" here seems unexpected to me, since we aren't writing to disk e.g.. The client does a "write" which involves a Writer class, followed by a Reader, when together both are needed to essentially "read" the symbols from Modules. Maybe "buildSymbolTable" or something like that. The Writer is more like a Builder.<br>
> Renamed to "build" (likewise to "Builder").<br>
Every time I go into this code it bugs me a little that we have a reader and a builder (as opposed to a writer). I hate to bring up a bikeshedding topic, and it's not a big deal I guess, but would you mind if I rename this back to write/Writer? In support of my position I point to the many Writer classes we have in LLVM [1] that are not necessarily writing to disk.</blockquote><div><br></div></span><div>To me a "writer" is doing some sort of serialization while a builder is constructing structured representation / program entities. There is not necessarily a disk involved. </div><div>So conceptually are you "building a SymTab from a Module" or "Writing a Module into a SymTab"?</div></div></div></blockquote><div><br></div><div>It's a little of both really. I guess I'd prefer to use a name which is symmetrical with the other thing in the file.</div><div><br></div><div>But anyway, that's all the bikeshedding I'm doing on this topic, I guess I'll just leave this as is if that isn't persuasive.</div></div><div><br></div><div>Thanks,</div>-- <br><div class="m_-7425202643827810658gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">-- <div>Peter</div></div></div>
</div></div>