llvm.org GIT mirror llvm / 41247e1
Make find_opt_files vararg This is slightly less verbose for the common case of a single build directory and more intuitive when using this API directly from the interpreter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@314491 91177308-0d34-0410-b5e6-96231b3b80d8 Adam Nemet 1 year, 10 months ago
4 changed file(s) with 5 addition(s) and 5 deletion(s). Raw diff Collapse all Expand all
4545 parser.add_argument('--output', '-o', default='diff.opt.yaml')
4646 args = parser.parse_args()
4747
48 files1 = optrecord.find_opt_files([args.yaml_dir_or_file_1])
49 files2 = optrecord.find_opt_files([args.yaml_dir_or_file_2])
48 files1 = optrecord.find_opt_files(args.yaml_dir_or_file_1)
49 files2 = optrecord.find_opt_files(args.yaml_dir_or_file_2)
5050
5151 print_progress = not args.no_progress_indicator
5252 all_remarks1, _, _ = optrecord.gather_results(files1, args.jobs, print_progress)
4242
4343 print_progress = not args.no_progress_indicator
4444
45 files = optrecord.find_opt_files(args.yaml_dirs_or_files)
45 files = optrecord.find_opt_files(*args.yaml_dirs_or_files)
4646 if not files:
4747 parser.error("No *.opt.yaml files found")
4848 sys.exit(1)
257257
258258 print_progress = not args.no_progress_indicator
259259
260 files = optrecord.find_opt_files(args.yaml_dirs_or_files)
260 files = optrecord.find_opt_files(*args.yaml_dirs_or_files)
261261 if not files:
262262 parser.error("No *.opt.yaml files found")
263263 sys.exit(1)
281281 return all_remarks, file_remarks, max_hotness != 0
282282
283283
284 def find_opt_files(dirs_or_files):
284 def find_opt_files(*dirs_or_files):
285285 all = []
286286 for dir_or_file in dirs_or_files:
287287 if os.path.isfile(dir_or_file):