diff options
author | Chris Lattner <sabre@nondot.org> | 2004-12-05 06:44:09 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-12-05 06:44:09 +0000 |
commit | 97e36f211bbca72b52efd5cc7f1196484eec2689 (patch) | |
tree | 1ac46dbcda80b919fa2a4424fc3b6fc5b337bca4 | |
parent | b392d307612043ffaadc7ed1c54b5a31faf11c66 (diff) | |
download | llvm-97e36f211bbca72b52efd5cc7f1196484eec2689.zip llvm-97e36f211bbca72b52efd5cc7f1196484eec2689.tar.gz llvm-97e36f211bbca72b52efd5cc7f1196484eec2689.tar.bz2 |
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
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 @@ 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()) |