]> granicus.if.org Git - llvm/commitdiff
update_mir_test_checks: Handle empty liveins
authorJustin Bogner <mail@justinbogner.com>
Wed, 18 Oct 2017 15:38:56 +0000 (15:38 +0000)
committerJustin Bogner <mail@justinbogner.com>
Wed, 18 Oct 2017 15:38:56 +0000 (15:38 +0000)
An empty livein block doesn't make much sense (why not just omit it?)
but they're legal and some tests have them, so its best to handle it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316089 91177308-0d34-0410-b5e6-96231b3b80d8

utils/update_mir_test_checks.py

index 7b9197474f6bee5024276364d9009d3d17a713e0..e2ae3e7b51e481ed760223bec5bf51542f846f29 100755 (executable)
@@ -40,7 +40,7 @@ VREG_RE = re.compile(r'(%[0-9]+)(?::[a-z0-9_]+)?(?:\([<>a-z0-9 ]+\))?')
 VREG_DEF_RE = re.compile(
     r'^ *(?P<vregs>{0}(?:, {0})*) '
     r'= (?P<opcode>[A-Zt][A-Za-z0-9_]+)'.format(VREG_RE.pattern))
-PREFIX_DATA_RE = re.compile(r'^ *(;|bb.[0-9].*: *$|[a-z]+: |$)')
+PREFIX_DATA_RE = re.compile(r'^ *(;|bb.[0-9].*: *$|[a-z]+:( |$)|$)')
 
 MIR_FUNC_RE = re.compile(
     r'^---$'