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
This commit is contained in:
Justin Bogner 2018-01-23 06:39:04 +00:00
parent cde18b4b19
commit eaae305a09
1 changed files with 1 additions and 1 deletions

View File

@ -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':