When printing out a function, make sure that local and global symbols
don't conflict.  This fixes Assembler/2004-12-05-LocalGlobalSymtabConflict.ll

llvm-svn: 18532
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 0b10218..dde6b9d 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -879,6 +879,9 @@
   // Print out the return type and name...
   Out << "\n";
 
+  // Ensure that no local symbols conflict with global symbols.
+  const_cast<Function*>(F)->renameLocalSymbols();
+
   if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
 
   if (F->isExternal())