Replace deprecated tcl case statements with switch statements

binutils/
	* testsuite/lib/binutils-common.exp (big_or_little_endian): Replace
	case statement with switch statement.
gas/
	* testsuite/gas/all/gas.exp: Replace case statements with switch
	statements.
	* testsuite/gas/elf/elf.exp: Likewise.
	* testsuite/gas/macros/macros.exp: Likewise.
	* testsuite/lib/gas-defs.exp: Likewise.
ld/
	* testsuite/ld-elfvers/vers.exp: Replace case statements with
	switch statements.
	* testsuite/ld-ifunc/ifunc.exp: Likewise.
	* testsuite/ld-unique/unique.exp: Likewise.
This commit is contained in:
Alan Modra 2020-01-27 10:51:52 +10:30
parent 7568c93bf9
commit e3696f67ab
11 changed files with 148 additions and 114 deletions

View file

@ -1399,12 +1399,24 @@ proc big_or_little_endian {} {
set tmp_flags " [board_info [target_info name] multilib_flags]"
foreach x $tmp_flags {
case $x in {
{*big*endian eb EB -eb -EB -mb -meb} {
switch -glob $x {
*big*endian -
eb -
EB -
-eb -
-EB -
-mb -
-meb {
set flags " -EB"
return $flags
}
{*little*endian el EL -el -EL -ml -mel} {
*little*endian -
el -
EL -
-el -
-EL -
-ml -
-mel {
set flags " -EL"
return $flags
}