This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dwarfdump][test] Use verbose output to check expected opcodes
ClosedPublic

Authored by jhenderson on May 29 2020, 6:20 AM.

Details

Summary

The debug_line_invalid.test test case was previously using the interpreted line table dumping to identify which opcodes have been parsed. This change moves to looking for the expected opcodes explicitly. This is probably a little clearer and also allows for testing some cases that wouldn't be easily identifiable from the interpreted table.

Diff Detail

Event Timeline

jhenderson created this revision.May 29 2020, 6:20 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 29 2020, 6:20 AM
Herald added a subscriber: cmtice. · View Herald Transcript
MaskRay accepted this revision.EditedMay 30 2020, 12:29 PM

Looks great! Perhaps we should add a row table header for -debug-line -verbose output. Sent D80874

BTW, do you think the FileCheck option name --implicit-check-not is too long? It can easily cause line wraps if the option is repeated a few times. Does it deserve an alias? The same goes for --match-full-lines and --strict-whitespace

This revision is now accepted and ready to land.May 30 2020, 12:29 PM

BTW, do you think the FileCheck option name --implicit-check-not is too long? It can easily cause line wraps if the option is repeated a few times. Does it deserve an alias? The same goes for --match-full-lines and --strict-whitespace

An alias for the options might well make sense. Also, perhaps we need an equivalent to --check-prefixes for --implicit-check-not, to allow something like --implicit-check-nots=' DW_LNS, DW_LNE'. We could of course combine multiple --implicit-check-not usages via regexes, but I think there's a risk of making easy mistakes that way.

This revision was automatically updated to reflect the committed changes.