[PATCH] AsmWriter/Bitcode: Support specialized debug nodes
Duncan P. N. Exon Smith
dexonsmith at apple.com
Tue Feb 10 16:54:54 PST 2015
> On 2015-Feb-10, at 16:16, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Tue, Feb 10, 2015 at 4:05 PM, Adrian Prantl <aprantl at apple.com> wrote:
> A few nitpicky suggestions and questions:
>
> - !MDSubrange(count: 30, lo: 2)
> what about spelling out “low” and “high”?
>
> +1
(Just saw this -- please see my reply to Adrian.)
> - do we still need the uniqueID on MDLexicalBlock? Could it be a distinct node instead?
>
> We might need to go back & figure out what that uniqueID is for - the comments/code say something about templates, though I don't believe it (template instantiations would be distinct functions, so the lexical blocks would be distinct by virtue of referring to their distinct enclosing scopes)...
>
I imagine this is from macros:
#define DO_SOMETHING(cond) \
do {
if (cond)
foo();
else
bar();
} while (false)
The `if` and `else` blocks are indistinguishable:
scope: same parent scope, which includes `cond`
file: instantiation file
line: instantiation line
column: instantiation column
So I think we do need *something* here. I was planning to drop the
`unique_id` field and make these `distinct` instead when I moved these
into place.
Maybe I should do that first though?
More information about the llvm-commits
mailing list