emit ELF .type directives through MCStreamer instead of doing it textually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94436 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index ecf18da..8935445 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -156,13 +156,8 @@
MCSymbol *GVSym = GetGlobalValueSymbol(GV);
printVisibility(GVSym, GV->getVisibility());
- if (MAI->hasDotTypeDotSizeDirective()) {
- O << "\t.type\t" << *GVSym;
- if (MAI->getCommentString()[0] != '@')
- O << ",@object\n";
- else
- O << ",%object\n";
- }
+ if (MAI->hasDotTypeDotSizeDirective())
+ OutStreamer.EmitSymbolAttribute(GVSym, MCSA_ELF_TypeObject);
SectionKind GVKind = TargetLoweringObjectFile::getKindForGlobal(GV, TM);