Skip to content

Commit 34387fc

Browse files
authored
[AsmPrinter] Simplify $local after D131429. NFC
setType is unneeded (and AsmPrinter tries not to modify symbols). AsmPrinter. MCSA_ELF_TypeFunction is available on all targets using getSymbolPreferLocal. Pull Request: #128138
1 parent 1586044 commit 34387fc

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,11 +1084,9 @@ void AsmPrinter::emitFunctionEntryLabel() {
10841084
if (TM.getTargetTriple().isOSBinFormatELF()) {
10851085
MCSymbol *Sym = getSymbolPreferLocal(MF->getFunction());
10861086
if (Sym != CurrentFnSym) {
1087-
cast<MCSymbolELF>(Sym)->setType(ELF::STT_FUNC);
10881087
CurrentFnBeginLocal = Sym;
10891088
OutStreamer->emitLabel(Sym);
1090-
if (MAI->hasDotTypeDotSizeDirective())
1091-
OutStreamer->emitSymbolAttribute(Sym, MCSA_ELF_TypeFunction);
1089+
OutStreamer->emitSymbolAttribute(Sym, MCSA_ELF_TypeFunction);
10921090
}
10931091
}
10941092
}

0 commit comments

Comments
 (0)