summaryrefslogtreecommitdiffstats
path: root/llvm/utils
diff options
context:
space:
mode:
authorBrian Gesiak <modocache@gmail.com>2017-06-29 16:20:31 +0000
committerBrian Gesiak <modocache@gmail.com>2017-06-29 16:20:31 +0000
commit39b88f01a53cc561c0002361eb77b1a4d0d35bfd (patch)
tree936877baa96f35eddaf6477ce1cf4fb419737afd /llvm/utils
parentef9fc29d4effcd7186a0a4a0f7e02e25bbcbd7fc (diff)
downloadbcm5719-llvm-39b88f01a53cc561c0002361eb77b1a4d0d35bfd.tar.gz
bcm5719-llvm-39b88f01a53cc561c0002361eb77b1a4d0d35bfd.zip
[opt-viewer] opt-viewer.py takes -o argument
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 llvm-svn: 306694
Diffstat (limited to 'llvm/utils')
-rwxr-xr-xllvm/utils/opt-viewer/opt-viewer.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/llvm/utils/opt-viewer/opt-viewer.py b/llvm/utils/opt-viewer/opt-viewer.py
index 3f5503f26b1..88a613b78a7 100755
--- a/llvm/utils/opt-viewer/opt-viewer.py
+++ b/llvm/utils/opt-viewer/opt-viewer.py
@@ -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',
OpenPOWER on IntegriCloud