aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-05 06:44:09 +0000
committerChris Lattner <sabre@nondot.org>2004-12-05 06:44:09 +0000
commit333529e6be764aa1e4f83eb25817407a758f37c8 (patch)
tree23e823eddf22a942212edf04e1081af3a72dedb0 /lib/VMCore/AsmWriter.cpp
parentcaa4ae7c3fcbb69081eb1556d2c5fbaa21202b39 (diff)
downloadexternal_llvm-333529e6be764aa1e4f83eb25817407a758f37c8.zip
external_llvm-333529e6be764aa1e4f83eb25817407a758f37c8.tar.gz
external_llvm-333529e6be764aa1e4f83eb25817407a758f37c8.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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18532 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/AsmWriter.cpp')
-rw-r--r--lib/VMCore/AsmWriter.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 0b10218..dde6b9d 100644
--- a/lib/VMCore/AsmWriter.cpp
+++ b/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())