summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-05-06 03:00:40 +0000
committerChris Lattner <sabre@nondot.org>2002-05-06 03:00:40 +0000
commitb2f02e5952c34da3d15d0323fede4c6ef977e1db (patch)
tree923c8a665c93c5791f1e4dc9fea043970ff96eed
parent94121c94094430fb7d859f5c8bfc8b771117782a (diff)
downloadbcm5719-llvm-b2f02e5952c34da3d15d0323fede4c6ef977e1db.tar.gz
bcm5719-llvm-b2f02e5952c34da3d15d0323fede4c6ef977e1db.zip
Print functions with curly braces instead of begin/end
llvm-svn: 2469
-rw-r--r--llvm/lib/VMCore/AsmWriter.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/llvm/lib/VMCore/AsmWriter.cpp b/llvm/lib/VMCore/AsmWriter.cpp
index bece7b8d725..48195d0598d 100644
--- a/llvm/lib/VMCore/AsmWriter.cpp
+++ b/llvm/lib/VMCore/AsmWriter.cpp
@@ -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();
OpenPOWER on IntegriCloud