llvm/mlir/include/mlir/Support/IndentedOstream.h

//===- IndentedOstream.h - raw ostream wrapper to indent --------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// raw_ostream subclass that keeps track of indentation for textual output
// where indentation helps readability.
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_SUPPORT_INDENTEDOSTREAM_H_
#define MLIR_SUPPORT_INDENTEDOSTREAM_H_

#include "mlir/Support/LLVM.h"
#include "llvm/Support/raw_ostream.h"

namespace mlir {

/// raw_ostream subclass that simplifies indention a sequence of code.
class raw_indented_ostream : public raw_ostream {};

inline raw_indented_ostream &
mlir::raw_indented_ostream::printReindented(StringRef str,
                                            StringRef extraPrefix) {}

inline void mlir::raw_indented_ostream::write_impl(const char *ptr,
                                                   size_t size) {}

} // namespace mlir
#endif // MLIR_SUPPORT_INDENTEDOSTREAM_H_