Print functions with curly braces instead of begin/end
authorChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 03:00:40 +0000 (03:00 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 6 May 2002 03:00:40 +0000 (03:00 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2469 91177308-0d34-0410-b5e6-96231b3b80d8

lib/VMCore/AsmWriter.cpp

index bece7b8d7254a37c0d3ce6ccd176b775c0559ecc..48195d0598d85b602fe6a8aee3db471d9121c7fd 100644 (file)
@@ -504,7 +504,7 @@ void AssemblyWriter::printModule(const Module *M) {
   for_each(M->gbegin(), M->gend(), 
           bind_obj(this, &AssemblyWriter::printGlobal));
 
-  Out << "\n; Functions:\n";
+  Out << "\nimplementation   ; Functions:\n";
   
   // Output all of the functions...
   for_each(M->begin(), M->end(), bind_obj(this,&AssemblyWriter::printFunction));
@@ -598,20 +598,18 @@ void AssemblyWriter::printFunction(const Function *M) {
     if (MT->getParamTypes().size()) Out << ", ";
     Out << "...";  // Output varargs portion of signature!
   }
-  Out << ")\n";
+  Out << ")";
 
-  if (!M->isExternal()) {
-    // Loop over the symbol table, emitting all named constants...
-    if (M->hasSymbolTable())
-      printSymbolTable(*M->getSymbolTable());
-
-    Out << "begin";
+  if (M->isExternal()) {
+    Out << "\n";
+  } else {
+    Out << " {";
   
     // Output all of its basic blocks... for the function
     for_each(M->begin(), M->end(),
             bind_obj(this, &AssemblyWriter::printBasicBlock));
 
-    Out << "end\n";
+    Out << "}\n";
   }
 
   Table.purgeFunction();