summaryrefslogtreecommitdiff
path: root/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
commit95461910b8134c70de1d94f6854b64cfff3615d9 (patch)
treef980026df6f967425fc268f5db5ff564f54d7a3e /utils/update_mir_test_checks.py
parentc0d997dcdfa01940464bbec7b1ffa58b6555ad5c (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323178 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/update_mir_test_checks.py')
-rwxr-xr-xutils/update_mir_test_checks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/update_mir_test_checks.py b/utils/update_mir_test_checks.py
index 3756af1b517..068c418b279 100755
--- a/utils/update_mir_test_checks.py
+++ b/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':