Don't globalize internal functions
authorChris Lattner <sabre@nondot.org>
Fri, 16 Dec 2005 00:07:30 +0000 (00:07 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 16 Dec 2005 00:07:30 +0000 (00:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24727 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ATTAsmPrinter.cpp

index 73e14a354221d144ffd9e02fefcec73243e3a2db..f8e172419248680e00af8427acbea2a5c4bccb8e 100755 (executable)
@@ -34,7 +34,8 @@ bool X86ATTAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
   // 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";