[all-commits] [llvm/llvm-project] 9b8515: Add indented raw_ostream class

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Sat Oct 3 15:18:03 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 9b851527d53345c4a5d56a909dfa1ca7f59a0c11
      https://github.com/llvm/llvm-project/commit/9b851527d53345c4a5d56a909dfa1ca7f59a0c11
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2020-10-03 (Sat, 03 Oct 2020)

  Changed paths:
    A mlir/include/mlir/Support/IndentedOstream.h
    M mlir/lib/Support/CMakeLists.txt
    A mlir/lib/Support/IndentedOstream.cpp
    M mlir/tools/mlir-tblgen/CMakeLists.txt
    M mlir/tools/mlir-tblgen/OpDocGen.cpp
    M mlir/tools/mlir-tblgen/RewriterGen.cpp
    A mlir/unittests/Support/CMakeLists.txt
    A mlir/unittests/Support/IndentedOstreamTest.cpp

  Log Message:
  -----------
  Add indented raw_ostream class

Class simplifies keeping track of the indentation while emitting. For every new line the current indentation is simply prefixed (if not at start of line, then it just emits as normal). Add a simple Region helper that makes it easy to have the C++ scope match the emitted scope.

Use this in op doc generator and rewrite generator.

This reverts revert commit be185b6a7355fdfeb1c31df2e1272366fe58b01f addresses shared lib failure by fixing up cmake files.

Differential Revision: https://reviews.llvm.org/D84107




More information about the All-commits mailing list