LLVM 20.0.0git
|
Serialize the remarks to YAML. More...
#include "llvm/Remarks/YAMLRemarkSerializer.h"
Public Member Functions | |
YAMLRemarkSerializer (raw_ostream &OS, SerializerMode Mode, std::optional< StringTable > StrTab=std::nullopt) | |
void | emit (const Remark &Remark) override |
Emit a remark to the stream. | |
std::unique_ptr< MetaSerializer > | metaSerializer (raw_ostream &OS, std::optional< StringRef > ExternalFilename=std::nullopt) override |
Return the corresponding metadata serializer. | |
Public Member Functions inherited from llvm::remarks::RemarkSerializer | |
RemarkSerializer (Format SerializerFormat, raw_ostream &OS, SerializerMode Mode) | |
virtual | ~RemarkSerializer ()=default |
This is just an interface. | |
virtual void | emit (const Remark &Remark)=0 |
Emit a remark to the stream. | |
virtual std::unique_ptr< MetaSerializer > | metaSerializer (raw_ostream &OS, std::optional< StringRef > ExternalFilename=std::nullopt)=0 |
Return the corresponding metadata serializer. | |
Static Public Member Functions | |
static bool | classof (const RemarkSerializer *S) |
Public Attributes | |
yaml::Output | YAMLOutput |
The YAML streamer. | |
Public Attributes inherited from llvm::remarks::RemarkSerializer | |
Format | SerializerFormat |
The format of the serializer. | |
raw_ostream & | OS |
The open raw_ostream that the remark diagnostics are emitted to. | |
SerializerMode | Mode |
The serialization mode. | |
std::optional< StringTable > | StrTab |
The string table containing all the unique strings used in the output. | |
Protected Member Functions | |
YAMLRemarkSerializer (Format SerializerFormat, raw_ostream &OS, SerializerMode Mode, std::optional< StringTable > StrTab=std::nullopt) | |
Serialize the remarks to YAML.
One remark entry looks like this: — !<TYPE> Pass: <PASSNAME> Name: <REMARKNAME> DebugLoc: { File: <SOURCEFILENAME>, Line: <SOURCELINE>, Column: <SOURCECOLUMN> } Function: <FUNCTIONNAME> Args:
DebugLoc: { File: <FILE>, Line: <LINE>, Column: <COL> } ...
Definition at line 34 of file YAMLRemarkSerializer.h.
YAMLRemarkSerializer::YAMLRemarkSerializer | ( | raw_ostream & | OS, |
SerializerMode | Mode, | ||
std::optional< StringTable > | StrTab = std::nullopt |
||
) |
Definition at line 160 of file YAMLRemarkSerializer.cpp.
|
protected |
Definition at line 164 of file YAMLRemarkSerializer.cpp.
References llvm::remarks::RemarkSerializer::StrTab.
|
inlinestatic |
Definition at line 46 of file YAMLRemarkSerializer.h.
References llvm::remarks::RemarkSerializer::SerializerFormat, and llvm::remarks::YAML.
Emit a remark to the stream.
Implements llvm::remarks::RemarkSerializer.
Reimplemented in llvm::remarks::YAMLStrTabRemarkSerializer.
Definition at line 172 of file YAMLRemarkSerializer.cpp.
References YAMLOutput.
Referenced by llvm::remarks::YAMLStrTabRemarkSerializer::emit().
|
overridevirtual |
Return the corresponding metadata serializer.
Implements llvm::remarks::RemarkSerializer.
Reimplemented in llvm::remarks::YAMLStrTabRemarkSerializer.
Definition at line 179 of file YAMLRemarkSerializer.cpp.
References llvm::remarks::RemarkSerializer::OS.
yaml::Output llvm::remarks::YAMLRemarkSerializer::YAMLOutput |