LLVM 20.0.0git
|
Serialize the remarks to YAML using a string table. More...
#include "llvm/Remarks/YAMLRemarkSerializer.h"
Public Member Functions | |
YAMLStrTabRemarkSerializer (raw_ostream &OS, SerializerMode Mode) | |
YAMLStrTabRemarkSerializer (raw_ostream &OS, SerializerMode Mode, StringTable StrTab) | |
void | emit (const Remark &Remark) override |
Override to emit the metadata if necessary. | |
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::YAMLRemarkSerializer | |
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) |
Static Public Member Functions inherited from llvm::remarks::YAMLRemarkSerializer | |
static bool | classof (const RemarkSerializer *S) |
Public Attributes | |
bool | DidEmitMeta = false |
Wether we already emitted the metadata in standalone mode. | |
Public Attributes inherited from llvm::remarks::YAMLRemarkSerializer | |
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. | |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::remarks::YAMLRemarkSerializer | |
YAMLRemarkSerializer (Format SerializerFormat, raw_ostream &OS, SerializerMode Mode, std::optional< StringTable > StrTab=std::nullopt) | |
Serialize the remarks to YAML using a string table.
An remark entry looks like the regular YAML remark but instead of string entries it's using numbers that map to an index in the string table.
Definition at line 68 of file YAMLRemarkSerializer.h.
|
inline |
Definition at line 73 of file YAMLRemarkSerializer.h.
References llvm::remarks::RemarkSerializer::StrTab.
|
inline |
Definition at line 78 of file YAMLRemarkSerializer.h.
|
inlinestatic |
Definition at line 89 of file YAMLRemarkSerializer.h.
References llvm::remarks::RemarkSerializer::SerializerFormat, and llvm::remarks::YAMLStrTab.
Override to emit the metadata if necessary.
Reimplemented from llvm::remarks::YAMLRemarkSerializer.
Definition at line 184 of file YAMLRemarkSerializer.cpp.
References DidEmitMeta, llvm::remarks::MetaSerializer::emit(), llvm::remarks::YAMLRemarkSerializer::emit(), metaSerializer(), llvm::remarks::RemarkSerializer::Mode, llvm::remarks::RemarkSerializer::OS, and llvm::remarks::Standalone.
|
overridevirtual |
Return the corresponding metadata serializer.
Reimplemented from llvm::remarks::YAMLRemarkSerializer.
Definition at line 198 of file YAMLRemarkSerializer.cpp.
References assert(), llvm::remarks::RemarkSerializer::OS, and llvm::remarks::RemarkSerializer::StrTab.
Referenced by emit().
bool llvm::remarks::YAMLStrTabRemarkSerializer::DidEmitMeta = false |
Wether we already emitted the metadata in standalone mode.
This should be set to true after the first invocation of emit
.
Definition at line 71 of file YAMLRemarkSerializer.h.
Referenced by emit().