<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 4, 2015 at 2:50 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Add specialized debug info metadata nodes that match the `DIDescriptor`<br>
wrappers (used by `DIBuilder`) closely.  Assembly and bitcode support to<br>
follow soon (it'll mostly just be obvious), but this sketches in today's<br>
schema.  This is the first big commit (well, the only *big* one aside<br>
from the testcase changes that'll come when I move this into place) for<br>
PR22464.<br>
<br>
I've marked a bunch of obvious changes as `TODO`s in the source; I plan<br>
to make those changes promptly after this hierarchy is moved underneath<br>
`DIDescriptor`, but for now I'm aiming mostly to match the status quo.<br>
<br>
I don't need a low-level review here (although always welcome); I'm<br>
mainly looking for the following:<br>
<br>
  - The word 'context' is overloaded: `MDNode::getContext()` already<br>
    exists, and returns an `LLVMContext&`; `DIDescriptor` uses 'context'<br>
    to mean "the node that this one is defined inside".  I chose the<br>
    word 'parent' instead of 'context' here.  Is this word okay?  If<br>
    not, what about 'scope'?  This will be reflected in the assembly<br>
    changes to come (I'd like the C++ names to match the assembly names,<br>
    although technically it's not necessary).<br></blockquote><div><br>I'd /probably/ go with scope (we already have scope in the MDLocations, so that seems consistent), but fairly on-the-fence.<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  - Aside from the above, did I fail to match the current schema (in<br>
    llvm/IR/DebugInfo.h) some other way?<br>
  - I did this work as one big chunk because it was the easiest way for<br>
    me to match the hierarchy.  I imagine reviewing it as a whole is<br>
    easier for the same reason, but if someone has a strong preference<br>
    for this to be broken up when I commit it (it'd take some work, but<br>
    it would be mechanical) let me know.<br>
<br>
</blockquote></div><br></div></div>