summaryrefslogtreecommitdiffstats
path: root/llvm
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
commit13651f0c461e83f47fd22a50f9465235f193f290 (patch)
tree0df1137b0adc9120157743e3652be6aabb7b5741 /llvm
parent53db94da059adc98c554c4b5e81ec6c4966ef7f4 (diff)
downloadbcm5719-llvm-13651f0c461e83f47fd22a50f9465235f193f290.tar.gz
bcm5719-llvm-13651f0c461e83f47fd22a50f9465235f193f290.zip
Fix bug where we couldn't print a function without a name
llvm-svn: 8341
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp4
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...
OpenPOWER on IntegriCloud