forked from OSchip/llvm-project
Drop the trailing newline from the FuncOp syntax.
The ModulePrinter prints the newline now for children of the top-level module. This also fixes the location printing for functions as the location used to be printed on a different line. PiperOrigin-RevId: 257447633
This commit is contained in:
parent
054e25c079
commit
1b247a1247
|
@ -1622,7 +1622,7 @@ void ModulePrinter::print(ModuleOp module) {
|
|||
auto *moduleBody = module.getBody();
|
||||
for (auto &op : llvm::make_range(moduleBody->begin(), --moduleBody->end())) {
|
||||
opPrinter.print(&op);
|
||||
os << '\n';
|
||||
os << "\n\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -236,12 +236,9 @@ void FuncOp::print(OpAsmPrinter *p) {
|
|||
}
|
||||
|
||||
// Print the body if this is not an external function.
|
||||
if (!isExternal()) {
|
||||
if (!isExternal())
|
||||
p->printRegion(getBody(), /*printEntryBlockArgs=*/false,
|
||||
/*printBlockTerminators=*/true);
|
||||
*p << '\n';
|
||||
}
|
||||
*p << '\n';
|
||||
}
|
||||
|
||||
LogicalResult FuncOp::verify() {
|
||||
|
|
Loading…
Reference in New Issue