summaryrefslogtreecommitdiffstats
path: root/llvm/utils/update_mir_test_checks.py
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2018-01-23 06:39:04 +0000
committerJustin Bogner <mail@justinbogner.com>2018-01-23 06:39:04 +0000
commiteaae305a09360758df44fb3d13f3ef9988bc1fab (patch)
tree94cabdb2ddb74b24419a59553797889682f3d011 /llvm/utils/update_mir_test_checks.py
parentcde18b4b197647a7c586cb0b7b65e11b65a3fef0 (diff)
downloadbcm5719-llvm-eaae305a09360758df44fb3d13f3ef9988bc1fab.tar.gz
bcm5719-llvm-eaae305a09360758df44fb3d13f3ef9988bc1fab.zip
update_mir_test_checks: Improve the check for LLVM IR in MIR files
The LLVM IR section of a MIR document can start with "--- |" rather than just "---", because "|" is a sigil for a freeform document in YAML. We need to handle this so that we don't try to add check lines to the LLVM IR functions in a MIR file. llvm-svn: 323178
Diffstat (limited to 'llvm/utils/update_mir_test_checks.py')
-rwxr-xr-xllvm/utils/update_mir_test_checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/utils/update_mir_test_checks.py b/llvm/utils/update_mir_test_checks.py
index 3756af1b517..068c418b279 100755
--- a/llvm/utils/update_mir_test_checks.py
+++ b/llvm/utils/update_mir_test_checks.py
@@ -360,7 +360,7 @@ def update_test_file(llc, test, remove_common_prefixes=False,
if m:
state = 'ir function prefix'
func_name = m.group('func')
- if input_line.strip() == '---':
+ if input_line.rstrip('| \r\n') == '---':
state = 'document'
output_lines.append(input_line)
elif state == 'document':
OpenPOWER on IntegriCloud