Don't globalize internal functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24727 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Target/X86/X86ATTAsmPrinter.cpp b/lib/Target/X86/X86ATTAsmPrinter.cpp
index 73e14a3..f8e1724 100755
--- a/lib/Target/X86/X86ATTAsmPrinter.cpp
+++ b/lib/Target/X86/X86ATTAsmPrinter.cpp
@@ -34,7 +34,8 @@
// Print out labels for the function.
SwitchSection("\t.text\n", MF.getFunction());
EmitAlignment(4); // FIXME: This should be parameterized somewhere.
- O << "\t.globl\t" << CurrentFnName << "\n";
+ if (!MF.getFunction()->hasInternalLinkage())
+ O << "\t.globl\t" << CurrentFnName << "\n";
if (HasDotTypeDotSizeDirective)
O << "\t.type\t" << CurrentFnName << ", @function\n";
O << CurrentFnName << ":\n";