From: Chris Lattner Date: Wed, 3 Sep 2003 17:56:43 +0000 (+0000) Subject: Fix bug where we couldn't print a function without a name X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=b8565e3918d2e5d43a8e53f545a8a1c587582fd3;p=oota-llvm.git 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 --- 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...