#ifndef LLVM_IR_LLVMREMARKSTREAMER_H
#define LLVM_IR_LLVMREMARKSTREAMER_H
#include "llvm/Remarks/Remark.h"
#include "llvm/Support/Error.h"
#include <memory>
#include <optional>
#include <string>
namespace llvm {
class DiagnosticInfoOptimizationBase;
class LLVMContext;
class ToolOutputFile;
namespace remarks {
class RemarkStreamer;
}
class LLVMRemarkStreamer { … };
template <typename ThisError>
struct LLVMRemarkSetupErrorInfo : public ErrorInfo<ThisError> { … };
struct LLVMRemarkSetupFileError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupFileError> { … };
struct LLVMRemarkSetupPatternError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupPatternError> { … };
struct LLVMRemarkSetupFormatError
: LLVMRemarkSetupErrorInfo<LLVMRemarkSetupFormatError> { … };
Expected<std::unique_ptr<ToolOutputFile>>
setupLLVMOptimizationRemarks(LLVMContext &Context, StringRef RemarksFilename,
StringRef RemarksPasses, StringRef RemarksFormat,
bool RemarksWithHotness,
std::optional<uint64_t> RemarksHotnessThreshold = 0);
Error setupLLVMOptimizationRemarks(
LLVMContext &Context, raw_ostream &OS, StringRef RemarksPasses,
StringRef RemarksFormat, bool RemarksWithHotness,
std::optional<uint64_t> RemarksHotnessThreshold = 0);
}
#endif