Don't force newline before function attributes
authorAlex Zinenko <zinenko@google.com>
Thu, 21 Nov 2019 12:24:52 +0000 (04:24 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Thu, 21 Nov 2019 13:08:19 +0000 (05:08 -0800)
commitb5af3784a6b9c67f67a11a9308b043b877f01095
tree09853ee00d2d39a00648761c3ccafb4673043388
parent8bde4aa1bcc7745e1d4274046193358fe3181f16
Don't force newline before function attributes

Due to legacy reasons, a newline character followed by two spaces was always
inserted before the attributes of the function Op in pretty form. This breaks
formatting when functions are nested in some other operations. Don't print the
newline and just put the attributes on the same line, which is also more
consistent with module Op. Line breaking aware of indentation can be introduced
separately into the parser if deemed useful.

PiperOrigin-RevId: 281721793
mlir/lib/IR/FunctionSupport.cpp
mlir/test/Dialect/GPU/outlining.mlir
mlir/test/Dialect/LLVMIR/func.mlir
mlir/test/IR/parser.mlir
mlir/test/IR/test-symbol-rauw.mlir