From d5f6f30664ed53ef27d949fad0ce3994ea9988dd Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 9 Sep 2024 07:49:54 +0000 Subject: [PATCH] [MLGO] Add spaces at the end of lines in multiline string This patch adds spaces at the end of lines in multiline strings in the extract_ir script. Without this patch, the warning/info messages will be printed without spaces between words when there is a line break in the source which looks/reads weird. --- llvm/utils/mlgo-utils/mlgo/corpus/extract_ir.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir.py b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir.py index a7d52daaedba3b..40052ae83f85a9 100644 --- a/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir.py +++ b/llvm/utils/mlgo-utils/mlgo/corpus/extract_ir.py @@ -133,8 +133,8 @@ def main(args): elif args.input_type == "params": if not args.obj_base_dir: logging.info( - "-obj_base_dir is unspecified, assuming current directory." - "If no objects are found, use this option to specify the root" + "-obj_base_dir is unspecified, assuming current directory. " + "If no objects are found, use this option to specify the root " "directory for the object file paths in the input file." ) with open(args.input, encoding="utf-8") as f: @@ -143,9 +143,9 @@ def main(args): ) elif args.input_type == "directory": logging.warning( - "Using the directory input is only recommended if the build system" - "your project uses does not support any structured output that" - "ml-compiler-opt understands. If your build system provides a" + "Using the directory input is only recommended if the build system " + "your project uses does not support any structured output that " + "ml-compiler-opt understands. If your build system provides a " "structured compilation database, use that instead" ) objs = extract_ir_lib.load_from_directory(args.input, args.output_dir)