Skip to content

Commit 0fee7d9

Browse files
committed
lit: prefer discard over remove
Use `discard` rather than `remove` so that the exception is not raised and we do not need to check if the key is present.
1 parent a494e0a commit 0fee7d9

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

test/lit.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,8 +1057,7 @@ elif run_os == 'linux-androideabi' or run_os == 'linux-android':
10571057
tools_directory,
10581058
'-L%s' % make_path(test_resource_dir, config.target_sdk_name)])
10591059
# The Swift interpreter is not available when targeting Android.
1060-
if 'swift_interpreter' in config.available_features:
1061-
config.available_features.remove('swift_interpreter')
1060+
config.available_features.discard('swift_interpreter')
10621061

10631062
else:
10641063
lit_config.fatal("Don't know how to define target_run and "
@@ -1500,8 +1499,7 @@ else:
15001499
config.available_features.add('libdispatch')
15011500
else:
15021501
# TSan runtime requires libdispatch on non-Apple platforms
1503-
if 'tsan_runtime' in config.available_features:
1504-
config.available_features.remove('tsan_runtime')
1502+
config.available_features.discard('tsan_runtime')
15051503

15061504
if has_lib('Foundation'):
15071505
config.available_features.add('foundation')

0 commit comments

Comments
 (0)