From b8565e3918d2e5d43a8e53f545a8a1c587582fd3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 3 Sep 2003 17:56:43 +0000 Subject: [PATCH] Fix bug where we couldn't print a function without a name git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8341 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/AsmWriter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 4acf55bf89c..b9b2e8fe9e7 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/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...