#include "llvm/Remarks/YAMLRemarkSerializer.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Support/FileSystem.h"
#include <optional>
usingnamespacellvm;
usingnamespacellvm::remarks;
template <typename T>
static void mapRemarkHeader(yaml::IO &io, T PassName, T RemarkName,
std::optional<RemarkLocation> RL, T FunctionName,
std::optional<uint64_t> Hotness,
ArrayRef<Argument> Args) { … }
namespace llvm {
namespace yaml {
template <> struct MappingTraits<remarks::Remark *> { … };
template <> struct MappingTraits<RemarkLocation> { … };
struct StringBlockVal { … };
template <> struct BlockScalarTraits<StringBlockVal> { … };
SequenceTraits<ArrayRef<T>>;
template <> struct MappingTraits<Argument> { … };
}
}
LLVM_YAML_IS_SEQUENCE_VECTOR(Argument)
YAMLRemarkSerializer::YAMLRemarkSerializer(raw_ostream &OS, SerializerMode Mode,
std::optional<StringTable> StrTabIn)
: … { … }
YAMLRemarkSerializer::YAMLRemarkSerializer(Format SerializerFormat,
raw_ostream &OS, SerializerMode Mode,
std::optional<StringTable> StrTabIn)
: … { … }
void YAMLRemarkSerializer::emit(const Remark &Remark) { … }
std::unique_ptr<MetaSerializer> YAMLRemarkSerializer::metaSerializer(
raw_ostream &OS, std::optional<StringRef> ExternalFilename) { … }
void YAMLStrTabRemarkSerializer::emit(const Remark &Remark) { … }
std::unique_ptr<MetaSerializer> YAMLStrTabRemarkSerializer::metaSerializer(
raw_ostream &OS, std::optional<StringRef> ExternalFilename) { … }
static void emitMagic(raw_ostream &OS) { … }
static void emitVersion(raw_ostream &OS) { … }
static void emitStrTab(raw_ostream &OS,
std::optional<const StringTable *> StrTab) { … }
static void emitExternalFile(raw_ostream &OS, StringRef Filename) { … }
void YAMLMetaSerializer::emit() { … }
void YAMLStrTabMetaSerializer::emit() { … }