aboutsummaryrefslogtreecommitdiff
path: root/llvm/utils/UpdateTestChecks/common.py
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2021-11-18 09:05:28 -0800
committerPhilip Reames <listmail@philipreames.com>2021-11-18 09:07:19 -0800
commit180625fcb478877bfada337705ec4e2e1ecb8d7e (patch)
treec2a10c33de902a218575cb33b999f96ce7c92ebb /llvm/utils/UpdateTestChecks/common.py
parent1e954a1c6678d315ae233f4141fa3ed8f0d9d122 (diff)
downloadllvm-180625fcb478877bfada337705ec4e2e1ecb8d7e.zip
llvm-180625fcb478877bfada337705ec4e2e1ecb8d7e.tar.gz
llvm-180625fcb478877bfada337705ec4e2e1ecb8d7e.tar.bz2
Add a breadcrumb comment to make debugging a user error when using ./utils/update_analyze_test_checks.py easier.
We won't talk about how long it took me to figure this out. The difference in batch vs interactive on the "did you mean to print bitcode" message made this confusing.
Diffstat (limited to 'llvm/utils/UpdateTestChecks/common.py')
-rw-r--r--llvm/utils/UpdateTestChecks/common.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/utils/UpdateTestChecks/common.py b/llvm/utils/UpdateTestChecks/common.py
index 5cb5eb4..cf8c888 100644
--- a/llvm/utils/UpdateTestChecks/common.py
+++ b/llvm/utils/UpdateTestChecks/common.py
@@ -182,6 +182,9 @@ def invoke_tool(exe, cmd_args, ir, preprocess_cmd=None, verbose=False):
stdout = subprocess.check_output(exe + ' ' + applySubstitutions(cmd_args, substitutions),
shell=True, stdin=ir_file)
if sys.version_info[0] > 2:
+ # FYI, if you crashed here with a decode error, your run line probably
+ # results in bitcode or other binary format being written to the pipe.
+ # For an opt test, you probably want to add -S or -disable-output.
stdout = stdout.decode()
# Fix line endings to unix CR style.
return stdout.replace('\r\n', '\n')