Skip to content

Commit 56fbf33

Browse files
Minor fixups in extract_ir.py
This patch includes some (very) minor formatting changes. The flags are all grouped together, the single required flag statement is changed to mark_flag_as_required rather than passing an array with a single element to the flags version. This also fixes a typo that I made in patch earlier this week.
1 parent 6379f41 commit 56fbf33

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

compiler_opt/tools/extract_ir.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,20 +69,19 @@
6969
'-mllvm -lto-embed-bitcode=post-merge-pre-opt passed in the distributed '
7070
'case, or -Wl,--save-temps=import and -Wl,--thinlto-emit-index-files '
7171
'passed in the local case.')
72-
flags.mark_flags_as_required(['output_dir'])
73-
7472
flags.DEFINE_string(
7573
'cmd_section_name', '.llvmcmd',
7674
'The section name passed to llvm-objcopy. For ELF object files, the '
7775
'default .llvmcmd is correct. For Mach-O object files, one should use '
7876
'something like __LLVM,__cmdline')
79-
8077
flags.DEFINE_string(
8178
'bitcode_section_name', '.llvmbc',
8279
'The section name passed to llvm-objcopy. For ELF object files, the '
8380
'default .llvmbc is correct. For Mach-O object files, one should use '
8481
'__LLVM,__bitcode')
8582

83+
flags.mark_flag_as_required('output_dir')
84+
8685
FLAGS = flags.FLAGS
8786

8887

@@ -114,7 +113,7 @@ def main(argv):
114113
FLAGS.output_dir)
115114
elif FLAGS.input_type == 'directory':
116115
logging.warning(
117-
'Using the directory input is only reccomended if the build system'
116+
'Using the directory input is only recommended if the build system'
118117
'your project uses does not support any structured output that'
119118
'ml-compiler-opt understands. If your build system provides a'
120119
'structured compilation database, use that instead')

0 commit comments

Comments
 (0)