diff options
Diffstat (limited to 'clang/utils/check_cfc')
-rwxr-xr-x | clang/utils/check_cfc/check_cfc.py | 4 | ||||
-rwxr-xr-x | clang/utils/check_cfc/obj_diff.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/utils/check_cfc/check_cfc.py b/clang/utils/check_cfc/check_cfc.py index 0228f1d6259..aea9bdd6388 100755 --- a/clang/utils/check_cfc/check_cfc.py +++ b/clang/utils/check_cfc/check_cfc.py @@ -98,8 +98,8 @@ def remove_dir_from_path(path_var, directory): PATH""" pathlist = path_var.split(os.pathsep) norm_directory = os.path.normpath(os.path.normcase(directory)) - pathlist = filter(lambda x: os.path.normpath( - os.path.normcase(x)) != norm_directory, pathlist) + pathlist = [x for x in pathlist if os.path.normpath( + os.path.normcase(x)) != norm_directory] return os.pathsep.join(pathlist) def path_without_wrapper(): diff --git a/clang/utils/check_cfc/obj_diff.py b/clang/utils/check_cfc/obj_diff.py index cc4c2a97d5e..61b9118df83 100755 --- a/clang/utils/check_cfc/obj_diff.py +++ b/clang/utils/check_cfc/obj_diff.py @@ -25,7 +25,7 @@ def disassemble(objfile): if p.returncode or err: print("Disassemble failed: {}".format(objfile)) sys.exit(1) - return filter(keep_line, out.split(os.linesep)) + return [line for line in out.split(os.linesep) if keep_line(line)] def dump_debug(objfile): """Dump all of the debug info from a file.""" @@ -34,7 +34,7 @@ def dump_debug(objfile): if p.returncode or err: print("Dump debug failed: {}".format(objfile)) sys.exit(1) - return filter(keep_line, out.split(os.linesep)) + return [line for line in out.split(os.linesep) if keep_line(line)] def first_diff(a, b, fromfile, tofile): """Returns the first few lines of a difference, if there is one. Python |