[PATCH] IR: Add specialized debug info metadata nodes

Duncan P. N. Exon Smith dexonsmith at apple.com
Wed Feb 4 15:00:29 PST 2015

> On 2015-Feb-04, at 14:58, David Blaikie <dblaikie at gmail.com> wrote:
> On Wed, Feb 4, 2015 at 2:50 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
> Add specialized debug info metadata nodes that match the `DIDescriptor`
> wrappers (used by `DIBuilder`) closely.  Assembly and bitcode support to
> follow soon (it'll mostly just be obvious), but this sketches in today's
> schema.  This is the first big commit (well, the only *big* one aside
> from the testcase changes that'll come when I move this into place) for
> PR22464.
> I've marked a bunch of obvious changes as `TODO`s in the source; I plan
> to make those changes promptly after this hierarchy is moved underneath
> `DIDescriptor`, but for now I'm aiming mostly to match the status quo.
> I don't need a low-level review here (although always welcome); I'm
> mainly looking for the following:
>   - The word 'context' is overloaded: `MDNode::getContext()` already
>     exists, and returns an `LLVMContext&`; `DIDescriptor` uses 'context'
>     to mean "the node that this one is defined inside".  I chose the
>     word 'parent' instead of 'context' here.  Is this word okay?  If
>     not, what about 'scope'?  This will be reflected in the assembly
>     changes to come (I'd like the C++ names to match the assembly names,
>     although technically it's not necessary).
> I'd /probably/ go with scope (we already have scope in the MDLocations, so that seems consistent), but fairly on-the-fence.

Weirdly, I didn't even notice that :).  In that case I like 'scope'
better too.  I'll update to that before commit.

More information about the llvm-commits mailing list