diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py index 3754aa2eeba85..a7e87b982916d 100644 --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -32,7 +32,7 @@ class string: ) ASM_FUNCTION_ARM_RE = re.compile( - r'^(?P[0-9a-zA-Z_$]+):[ \t]*@+[ \t]*@"?(?P=func)"?\n' # f: (name of function) + r'^(?P[0-9a-zA-Z_$]+):[ \t]*(@+[ \t]*@"?(?P=func)"?)?\n' # f: (name of function) r"(?:\.L(?P=func)\$local:\n)?" # drop .L$local: r"(?:\s*\.type\s+\.L(?P=func)\$local,@function\n)?" # drop .type .L$local r"\s+\.fnstart\n" # .fnstart @@ -42,11 +42,11 @@ class string: ) ASM_FUNCTION_AARCH64_RE = re.compile( - r'^_?(?P[^:]+):[ \t]*\/\/[ \t]*@"?(?P=func)"?( (Function|Tail Call))?\n' + r'^_?(?P[a-zA-Z][a-zA-Z0-9]*):[ \t]*(\/\/[ \t]*@"?(?P=func)"?)?( (Function|Tail Call))?\n' r"(?:[ \t]+.cfi_startproc\n)?" # drop optional cfi noise - r"(?P.*?)\n" + r"(?P.*?)" # This list is incomplete - r"^\s*(\.Lfunc_end[0-9]+|// -- End function)", + r"^(\.Lfunc_end[0-9]+:|// -- End function)", flags=(re.M | re.S), ) @@ -175,7 +175,7 @@ class string: ) ASM_FUNCTION_ARM_MACHO_RE = re.compile( - r'^_(?P[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n' + r'^_(?P[^:]+):[ \t]*(@[ \t]@"?(?P=func)"?)?\n' r"([ \t]*.cfi_startproc\n[ \t]*)?" r"(?P.*?)\n" r"[ \t]*\.cfi_endproc\n", @@ -183,21 +183,21 @@ class string: ) ASM_FUNCTION_THUMBS_DARWIN_RE = re.compile( - r'^_(?P[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n' + r'^_(?P[^:]+):[ \t]*(@[ \t]@"?(?P=func)"?)?\n' r"(?P.*?)\n" r"[ \t]*\.data_region\n", flags=(re.M | re.S), ) ASM_FUNCTION_THUMB_DARWIN_RE = re.compile( - r'^_(?P[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n' + r'^_(?P[^:]+):[ \t]*(@[ \t]@"?(?P=func)"?)?\n' r"(?P.*?)\n" r"^[ \t]*@[ \t]--[ \t]End[ \t]function", flags=(re.M | re.S), ) ASM_FUNCTION_ARM_IOS_RE = re.compile( - r'^_(?P[^:]+):[ \t]*@[ \t]@"?(?P=func)"?\n' + r'^_(?P[^:]+):[ \t]*(@[ \t]@"?(?P=func)"?)?\n' r"(?P.*?)" r"^[ \t]*@[ \t]--[ \t]End[ \t]function", flags=(re.M | re.S),