testsuite: add dg-enable-nn-line-numbers
This patch adds support for obscuring the line numbers printed in the
left-hand margin when printing the source code, converting them to "NN",
e.g from:
7111 | if (!(flags & 0x0001)) {
| ^
| |
| (1) following 'true' branch...
7112 |
to:
NN | if (!(flags & 0x0001)) {
| ^
| |
| (1) following 'true' branch...
NN |
This is useful in followup patches e.g. when testing how interprocedural
paths are printed using multiline.exp, to avoid depending on precise line
numbers.
gcc/testsuite/ChangeLog:
* lib/gcc-dg.exp (cleanup-after-saved-dg-test): Reset global
nn_line_numbers_enabled.
* lib/multiline.exp (nn_line_numbers_enabled): New global.
(dg-enable-nn-line-numbers): New proc.
(maybe-handle-nn-line-numbers): New proc.
* lib/prune.exp (prune_gcc_output): Call maybe-handle-nn-line-numbers.
From-SVN: r280134