aboutsummaryrefslogtreecommitdiffstats
path: root/lib/VMCore
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-09-03 17:56:43 +0000
committerChris Lattner <sabre@nondot.org>2003-09-03 17:56:43 +0000
commitb8565e3918d2e5d43a8e53f545a8a1c587582fd3 (patch)
tree9d04982c8c9f930551d0db73a3c86fad7414f510 /lib/VMCore
parent3e80abee49a2fa01ad10e0638a1cd40d1cd65caf (diff)
downloadexternal_llvm-b8565e3918d2e5d43a8e53f545a8a1c587582fd3.zip
external_llvm-b8565e3918d2e5d43a8e53f545a8a1c587582fd3.tar.gz
external_llvm-b8565e3918d2e5d43a8e53f545a8a1c587582fd3.tar.bz2
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
Diffstat (limited to 'lib/VMCore')
-rw-r--r--lib/VMCore/AsmWriter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp
index 4acf55b..b9b2e8f 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...