summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/AsmWriter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/VMCore/AsmWriter.cpp')
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index 75016965128..527df4f0a17 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -574,7 +574,7 @@ void AssemblyWriter::printFunction(const Function *M) {
// Print out the return type and name...
Out << "\n" << (M->isExternal() ? "declare " : "")
<< (M->hasInternalLinkage() ? "internal " : "");
- printType(M->getReturnType()) << " \"" << M->getName() << "\"(";
+ printType(M->getReturnType()) << " %" << M->getName() << "(";
Table.incorporateFunction(M);
// Loop over the arguments, printing them...
@@ -768,7 +768,7 @@ void AssemblyWriter::printInstruction(const Instruction *I) {
writeOperand(AI->getArraySize(), true);
}
} else if (isa<CastInst>(I)) {
- writeOperand(Operand, true);
+ if (Operand) writeOperand(Operand, true);
Out << " to ";
printType(I->getType());
} else if (Operand) { // Print the normal way...
OpenPOWER on IntegriCloud