[PATCH] IR: Add specialized debug info metadata nodes
Duncan P. N. Exon Smith
dexonsmith at apple.com
Wed Feb 4 14:50:59 PST 2015
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).
- Aside from the above, did I fail to match the current schema (in
llvm/IR/DebugInfo.h) some other way?
- I did this work as one big chunk because it was the easiest way for
me to match the hierarchy. I imagine reviewing it as a whole is
easier for the same reason, but if someone has a strong preference
for this to be broken up when I commit it (it'd take some work, but
it would be mechanical) let me know.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-IR-Add-specialized-debug-info-metadata-nodes.patch
Type: application/octet-stream
Size: 156162 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150204/4f977a66/attachment.obj>
More information about the llvm-commits
mailing list