LLVM  15.0.0git
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
llvm::remarks::YAMLStrTabRemarkSerializer Struct Reference

Serialize the remarks to YAML using a string table. More...

#include "llvm/Remarks/YAMLRemarkSerializer.h"

Inheritance diagram for llvm::remarks::YAMLStrTabRemarkSerializer:
Inheritance graph
Collaboration diagram for llvm::remarks::YAMLStrTabRemarkSerializer:
Collaboration graph

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. More...
std::unique_ptr< MetaSerializermetaSerializer (raw_ostream &OS, Optional< StringRef > ExternalFilename=None) override
 Return the corresponding metadata serializer. More...
- Public Member Functions inherited from llvm::remarks::YAMLRemarkSerializer
 YAMLRemarkSerializer (raw_ostream &OS, SerializerMode Mode, Optional< StringTable > StrTab=None)
- Public Member Functions inherited from llvm::remarks::RemarkSerializer
 RemarkSerializer (Format SerializerFormat, raw_ostream &OS, SerializerMode Mode)
virtual ~RemarkSerializer ()=default
 This is just an interface. More...

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. More...
- Public Attributes inherited from llvm::remarks::YAMLRemarkSerializer
yaml::Output YAMLOutput
 The YAML streamer. More...
- Public Attributes inherited from llvm::remarks::RemarkSerializer
Format SerializerFormat
 The format of the serializer. More...
 The open raw_ostream that the remark diagnostics are emitted to. More...
SerializerMode Mode
 The serialization mode. More...
Optional< StringTableStrTab
 The string table containing all the unique strings used in the output. More...

Additional Inherited Members

- Protected Member Functions inherited from llvm::remarks::YAMLRemarkSerializer
 YAMLRemarkSerializer (Format SerializerFormat, raw_ostream &OS, SerializerMode Mode, Optional< StringTable > StrTab=None)

Detailed Description

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 67 of file YAMLRemarkSerializer.h.

Constructor & Destructor Documentation

◆ YAMLStrTabRemarkSerializer() [1/2]

llvm::remarks::YAMLStrTabRemarkSerializer::YAMLStrTabRemarkSerializer ( raw_ostream OS,
SerializerMode  Mode 

◆ YAMLStrTabRemarkSerializer() [2/2]

llvm::remarks::YAMLStrTabRemarkSerializer::YAMLStrTabRemarkSerializer ( raw_ostream OS,
SerializerMode  Mode,
StringTable  StrTab 

Definition at line 77 of file YAMLRemarkSerializer.h.

References llvm::remarks::YAMLStrTab.

Member Function Documentation

◆ classof()

static bool llvm::remarks::YAMLStrTabRemarkSerializer::classof ( const RemarkSerializer S)

Definition at line 88 of file YAMLRemarkSerializer.h.

References S, and llvm::remarks::YAMLStrTab.

◆ emit()

void YAMLStrTabRemarkSerializer::emit ( const Remark Remark)

◆ metaSerializer()

std::unique_ptr< MetaSerializer > YAMLStrTabRemarkSerializer::metaSerializer ( raw_ostream OS,
Optional< StringRef ExternalFilename = None 

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().

Member Data Documentation

◆ DidEmitMeta

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 70 of file YAMLRemarkSerializer.h.

Referenced by emit().

The documentation for this struct was generated from the following files: