Attirbute 'nodebug' means no llvm.dbg.* intrinsics, no !dbg annotations, and no DISubprogram for the function.
Details
Diff Detail
Event Timeline
SGTM
(heh, I don't even remember "llvm.dbg.func.start" - maybe that's from
before my time... yep, 2009)
Maybe it'd be nice to make sure that this test doesn't bitrot the same way
again - have a canary of some kind? (eg: a non-nodebug function and
positively CHECK for the same features - so if those checks ever fail, we
know we've accidentally made the negative tests for dbg/DISubprogram
invalid)
Seems weird - not sure if it's a good idea. Just a thought.
I had a similar thought, but had foolishly suppressed it. Since you had the same thought, it's probably worth paying attention to it.
Looks good - alternatively you could phrase this as a single function with
a macro for the nodebug attribute - two clang+FileCheck lines, one passes
-D to enable the nodebug, one passes an empty -D. Might be a more direct
comparison? (& does require two clang invocations, which is a tradeoff)
Yeah, but for this it doesn't really seem worthwhile; the functions are pretty trivial and the checks are very generic.
For something more specific/fine-tuned, or bigger test functions, it might be more worth it.
r240747, thanks!