diff options
author | Chris Lattner <sabre@nondot.org> | 2003-09-03 17:56:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-09-03 17:56:43 +0000 |
commit | 13651f0c461e83f47fd22a50f9465235f193f290 (patch) | |
tree | 0df1137b0adc9120157743e3652be6aabb7b5741 | |
parent | 53db94da059adc98c554c4b5e81ec6c4966ef7f4 (diff) | |
download | bcm5719-llvm-13651f0c461e83f47fd22a50f9465235f193f290.tar.gz bcm5719-llvm-13651f0c461e83f47fd22a50f9465235f193f290.zip |
Fix bug where we couldn't print a function without a name
llvm-svn: 8341
-rw-r--r-- | llvm/lib/VMCore/AsmWriter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp index 4acf55bf89c..b9b2e8fe9e7 100644 --- a/llvm/lib/VMCore/AsmWriter.cpp +++ b/llvm/lib/VMCore/AsmWriter.cpp @@ -658,7 +658,9 @@ void AssemblyWriter::printFunction(const Function *F) { case GlobalValue::ExternalLinkage: break; } - printType(F->getReturnType()) << " " << getLLVMName(F->getName()) << "("; + printType(F->getReturnType()) << " "; + if (!F->getName().empty()) Out << getLLVMName(F->getName()); + Out << "("; Table.incorporateFunction(F); // Loop over the arguments, printing them... |