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
This commit is contained in:
Chris Lattner 2004-12-05 06:44:09 +00:00
parent cdcd7126f1
commit 9c390fa13f

View File

@ -879,6 +879,9 @@ void AssemblyWriter::printFunction(const Function *F) {
// 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())