[testsuite] Simplify dg-final

2018-07-05  Tom de Vries  <tdevries@suse.de>

	* lib/gcc-dg.exp (dg-final): Simplify tcl code.

From-SVN: r262431
This commit is contained in:
Tom de Vries 2018-07-05 08:19:15 +00:00 committed by Tom de Vries
parent d3fc820eb9
commit ab7f778cee
2 changed files with 8 additions and 7 deletions

View File

@ -1,3 +1,7 @@
2018-07-05 Tom de Vries <tdevries@suse.de>
* lib/gcc-dg.exp (dg-final): Simplify tcl code.
2018-07-04 Martin Sebor <msebor@redhat.com>
PR tree-optimization/86274

View File

@ -123,13 +123,10 @@ proc dg-final { args } {
set line [lindex $args 0]
set code [lindex $args 1]
set directive [lindex $code 0]
set withline \
[switch $directive {
gdb-test {expr {1}}
default {expr {0}}
}]
if { $withline == 1 } {
set code [linsert $code 1 $line]
switch $directive {
gdb-test {
set code [linsert $code 1 $line]
}
}
append final-code "$code\n"
}