diff --git a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp --- a/llvm/lib/Target/ARM/ARMAsmPrinter.cpp +++ b/llvm/lib/Target/ARM/ARMAsmPrinter.cpp @@ -82,8 +82,7 @@ OutStreamer->emitSymbolAttribute(S, MCSA_ELF_TypeFunction); OutStreamer->emitLabel(S); } - - OutStreamer->emitLabel(CurrentFnSym); + AsmPrinter::emitFunctionEntryLabel(); } void ARMAsmPrinter::emitXXStructor(const DataLayout &DL, const Constant *CV) { diff --git a/llvm/test/CodeGen/ARM/dso-local-func.ll b/llvm/test/CodeGen/ARM/dso-local-func.ll --- a/llvm/test/CodeGen/ARM/dso-local-func.ll +++ b/llvm/test/CodeGen/ARM/dso-local-func.ll @@ -10,8 +10,7 @@ ; CHECK-NEXT: .type dsolocal_func,%function ; CHECK-NEXT: .code 32 ; CHECK-NEXT: dsolocal_func: -; TODO: PIC codegen should emit a $local alias here -; PIC-TODO-NEXT: .Ldsolocal_func$local: +; PIC-NEXT: .Ldsolocal_func$local: ; CHECK-NEXT: .fnstart ; CHECK-NEXT: @ %bb.0: ; STATIC-NEXT: movw r0, :lower16:dsolocal_func diff --git a/llvm/utils/UpdateTestChecks/asm.py b/llvm/utils/UpdateTestChecks/asm.py --- a/llvm/utils/UpdateTestChecks/asm.py +++ b/llvm/utils/UpdateTestChecks/asm.py @@ -24,6 +24,7 @@ ASM_FUNCTION_ARM_RE = re.compile( r'^(?P[0-9a-zA-Z_$]+):\n' # f: (name of function) + r'(?:\.L(?P=func)\$local:\n)?' # drop .L$local: r'\s+\.fnstart\n' # .fnstart r'(?P.*?)' # (body of the function) r'^.Lfunc_end[0-9]+:', # .Lfunc_end0: or # -- End function