#include "llvm/IR/LLVMRemarkStreamer.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/Remarks/RemarkStreamer.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/ToolOutputFile.h"
#include <optional>
usingnamespacellvm;
static remarks::Type toRemarkType(enum DiagnosticKind Kind) { … }
static std::optional<remarks::RemarkLocation>
toRemarkLocation(const DiagnosticLocation &DL) { … }
remarks::Remark
LLVMRemarkStreamer::toRemark(const DiagnosticInfoOptimizationBase &Diag) const { … }
void LLVMRemarkStreamer::emit(const DiagnosticInfoOptimizationBase &Diag) { … }
char LLVMRemarkSetupFileError::ID = …;
char LLVMRemarkSetupPatternError::ID = …;
char LLVMRemarkSetupFormatError::ID = …;
Expected<std::unique_ptr<ToolOutputFile>> llvm::setupLLVMOptimizationRemarks(
LLVMContext &Context, StringRef RemarksFilename, StringRef RemarksPasses,
StringRef RemarksFormat, bool RemarksWithHotness,
std::optional<uint64_t> RemarksHotnessThreshold) { … }
Error llvm::setupLLVMOptimizationRemarks(
LLVMContext &Context, raw_ostream &OS, StringRef RemarksPasses,
StringRef RemarksFormat, bool RemarksWithHotness,
std::optional<uint64_t> RemarksHotnessThreshold) { … }