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/Target/X86/AsmPrinter/X86AsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
index 2ffa18f..85ff09a 100644
--- a/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
+++ b/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp
@@ -106,7 +106,7 @@
   printVisibility(CurrentFnSym, F->getVisibility());
 
   if (Subtarget->isTargetELF()) {
-    O << "\t.type\t" << *CurrentFnSym << ",@function\n";
+    OutStreamer.EmitSymbolAttribute(CurrentFnSym, MCSA_ELF_TypeFunction);
   } else if (Subtarget->isTargetCygMing()) {
     O << "\t.def\t " << *CurrentFnSym;
     O << ";\t.scl\t" <<