Skip to content

Commit

Permalink
[opt-viewer] opt-viewer.py takes -o argument
Browse files Browse the repository at this point in the history
Summary:
Change how the output directory is specified when invoking
opt-viewer.py, from `opt-viewer.py yaml_file_one yaml_file_two output_dir` to
`opt-viewer.py -o output_dir yaml_file_one yaml_file_two`.

This makes it easier to pipe the results of another command into
opt-viewer.py. For example:

```
find . -name "*.yaml" -print | xargs /path/to/opt-viewer.py -o html
```

Reviewers: anemet, davidxl

Reviewed By: anemet

Subscribers: fhahn, llvm-commits

Differential Revision: https://reviews.llvm.org/D34711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@306694 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
modocache committed Jun 29, 2017
1 parent aeca92c commit 11eef88
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion utils/opt-viewer/opt-viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,13 @@ def generate_report(pmap, all_remarks, file_remarks, source_dir, output_dir, sho
if __name__ == '__main__':
parser = argparse.ArgumentParser(description=desc)
parser.add_argument('yaml_files', nargs='+')
parser.add_argument('output_dir')
parser.add_argument(
'--output-dir',
'-o',
default='html',
help='Path to a directory where generated HTML files will be output. '
'If the directory does not already exist, it will be created. '
'"%(default)s" by default.')
parser.add_argument(
'--jobs',
'-j',
Expand Down

0 comments on commit 11eef88

Please sign in to comment.