LLVM  10.0.0svn
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
[legend]
Collaboration diagram for llvm::remarks::YAMLStrTabRemarkSerializer:
Collaboration graph
[legend]

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...
 
raw_ostreamOS
 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 
)
inline

Definition at line 72 of file YAMLRemarkSerializer.h.

References llvm::remarks::RemarkSerializer::StrTab.

◆ YAMLStrTabRemarkSerializer() [2/2]

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

Member Function Documentation

◆ classof()

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

◆ emit()

void YAMLStrTabRemarkSerializer::emit ( const Remark Remark)
overridevirtual

◆ metaSerializer()

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

Return the corresponding metadata serializer.

Reimplemented from llvm::remarks::YAMLRemarkSerializer.

Definition at line 200 of file YAMLRemarkSerializer.cpp.

References assert(), llvm::remarks::RemarkSerializer::OS, and llvm::remarks::RemarkSerializer::StrTab.

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.


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