This is an archive of the discontinued LLVM Phabricator instance.

FileCheck-ize test and make sure more things don't happen.
ClosedPublic

Authored by probinson on Jun 25 2015, 1:58 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

probinson updated this revision to Diff 28501.Jun 25 2015, 1:58 PM
probinson retitled this revision from to FileCheck-ize test and make sure more things don't happen..
probinson updated this object.
probinson edited the test plan for this revision. (Show Details)
probinson added reviewers: dblaikie, echristo.
probinson added a subscriber: Unknown Object (MLST).
dblaikie edited edge metadata.Jun 25 2015, 2:06 PM

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.

probinson updated this revision to Diff 28510.Jun 25 2015, 4:10 PM
probinson edited edge metadata.

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)

This revision was automatically updated to reflect the committed changes.

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!