//===- llvm/Remarks/RemarkStreamer.h ----------------------------*- 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 // //===----------------------------------------------------------------------===// // // This file declares the main interface for streaming remarks. // // This is used to stream any llvm::remarks::Remark to an open file taking // advantage of all the serialization capabilities developed for remarks (e.g. // metadata in a section, bitstream format, etc.). // // Typically, a specialized remark emitter should hold a reference to the main // remark streamer set up in the LLVMContext, and should convert specialized // diagnostics to llvm::remarks::Remark objects as they get emitted. // // Specialized remark emitters can be components like: // * Remarks from LLVM (M)IR passes // * Remarks from the frontend // * Remarks from an intermediate IR // // This allows for composition between specialized remark emitters throughout // the compilation pipeline, that end up in the same file, using the same format // and serialization techniques. // //===----------------------------------------------------------------------===// #ifndef LLVM_REMARKS_REMARKSTREAMER_H #define LLVM_REMARKS_REMARKSTREAMER_H #include "llvm/Remarks/RemarkSerializer.h" #include "llvm/Support/Error.h" #include "llvm/Support/Regex.h" #include <memory> #include <optional> namespace llvm { class raw_ostream; namespace remarks { class RemarkStreamer final { … }; } // end namespace remarks } // end namespace llvm #endif // LLVM_REMARKS_REMARKSTREAMER_H