mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-07 14:33:15 +00:00
Print functions with curly braces instead of begin/end
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fac8a7052f
commit
03e2acb37f
@ -504,7 +504,7 @@ void AssemblyWriter::printModule(const Module *M) {
|
|||||||
for_each(M->gbegin(), M->gend(),
|
for_each(M->gbegin(), M->gend(),
|
||||||
bind_obj(this, &AssemblyWriter::printGlobal));
|
bind_obj(this, &AssemblyWriter::printGlobal));
|
||||||
|
|
||||||
Out << "\n; Functions:\n";
|
Out << "\nimplementation ; Functions:\n";
|
||||||
|
|
||||||
// Output all of the functions...
|
// Output all of the functions...
|
||||||
for_each(M->begin(), M->end(), bind_obj(this,&AssemblyWriter::printFunction));
|
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 << ", ";
|
if (MT->getParamTypes().size()) Out << ", ";
|
||||||
Out << "..."; // Output varargs portion of signature!
|
Out << "..."; // Output varargs portion of signature!
|
||||||
}
|
}
|
||||||
Out << ")\n";
|
Out << ")";
|
||||||
|
|
||||||
if (!M->isExternal()) {
|
if (M->isExternal()) {
|
||||||
// Loop over the symbol table, emitting all named constants...
|
Out << "\n";
|
||||||
if (M->hasSymbolTable())
|
} else {
|
||||||
printSymbolTable(*M->getSymbolTable());
|
Out << " {";
|
||||||
|
|
||||||
Out << "begin";
|
|
||||||
|
|
||||||
// Output all of its basic blocks... for the function
|
// Output all of its basic blocks... for the function
|
||||||
for_each(M->begin(), M->end(),
|
for_each(M->begin(), M->end(),
|
||||||
bind_obj(this, &AssemblyWriter::printBasicBlock));
|
bind_obj(this, &AssemblyWriter::printBasicBlock));
|
||||||
|
|
||||||
Out << "end\n";
|
Out << "}\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
Table.purgeFunction();
|
Table.purgeFunction();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user