Print out function name with % style instead of "" style
authorChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 22:29:26 +0000 (22:29 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 22 May 2002 22:29:26 +0000 (22:29 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2726 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index 750169651287e92d337c20c2472f614979dfacee..527df4f0a1717537b617a6019e2404742165626a 100644 (file)
@@ -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...