Skip to content

Commit 97e36f2

Browse files
committed
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
1 parent b392d30 commit 97e36f2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/VMCore/AsmWriter.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,9 @@ void AssemblyWriter::printFunction(const Function *F) {
879879
// Print out the return type and name...
880880
Out << "\n";
881881

882+
// Ensure that no local symbols conflict with global symbols.
883+
const_cast<Function*>(F)->renameLocalSymbols();
884+
882885
if (AnnotationWriter) AnnotationWriter->emitFunctionAnnot(F, Out);
883886

884887
if (F->isExternal())

0 commit comments

Comments
 (0)