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

Implementation of the remark serializer using LLVM bitstream. More...

#include "llvm/Remarks/BitstreamRemarkSerializer.h"

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

Public Member Functions

 BitstreamRemarkSerializer (raw_ostream &OS, SerializerMode Mode)
 Construct a serializer that will create its own string table. More...
 BitstreamRemarkSerializer (raw_ostream &OS, SerializerMode Mode, StringTable StrTab)
 Construct a serializer with a pre-filled string table. More...
void emit (const Remark &Remark) override
 Emit a remark to the stream. More...
std::unique_ptr< MetaSerializermetaSerializer (raw_ostream &OS, Optional< StringRef > ExternalFilename=None) override
 The metadata serializer associated to this remark serializer. More...
- 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)

Public Attributes

bool DidSetUp = false
 The file should contain: 1) The block info block that describes how to read the blocks. More...
BitstreamRemarkSerializerHelper Helper
 The helper to emit bitstream. 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...

Detailed Description

Implementation of the remark serializer using LLVM bitstream.

Definition at line 123 of file BitstreamRemarkSerializer.h.

Constructor & Destructor Documentation

◆ BitstreamRemarkSerializer() [1/2]

BitstreamRemarkSerializer::BitstreamRemarkSerializer ( raw_ostream OS,
SerializerMode  Mode 

◆ BitstreamRemarkSerializer() [2/2]

BitstreamRemarkSerializer::BitstreamRemarkSerializer ( raw_ostream OS,
SerializerMode  Mode,
StringTable  StrTab 

Member Function Documentation

◆ classof()

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

Definition at line 153 of file BitstreamRemarkSerializer.h.

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

◆ emit()

void BitstreamRemarkSerializer::emit ( const Remark Remark)

◆ metaSerializer()

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

The metadata serializer associated to this remark serializer.

Based on the container type of the current serializer, the container type of the metadata serializer will change.

Implements llvm::remarks::RemarkSerializer.

Definition at line 368 of file BitstreamRemarkSerializer.cpp.

References assert(), llvm::remarks::BitstreamRemarkSerializerHelper::ContainerType, Helper, llvm::remarks::RemarkSerializer::OS, llvm::remarks::SeparateRemarksMeta, llvm::remarks::Standalone, and llvm::remarks::RemarkSerializer::StrTab.

Member Data Documentation

◆ DidSetUp

bool llvm::remarks::BitstreamRemarkSerializer::DidSetUp = false

The file should contain: 1) The block info block that describes how to read the blocks.

2) The metadata block that contains various information about the remarks in the file. 3) A number of remark blocks. We need to set up 1) and 2) first, so that we can emit 3) after. This flag is used to emit the first two blocks only once.

Definition at line 132 of file BitstreamRemarkSerializer.h.

Referenced by emit().

◆ Helper

BitstreamRemarkSerializerHelper llvm::remarks::BitstreamRemarkSerializer::Helper

The helper to emit bitstream.

Definition at line 134 of file BitstreamRemarkSerializer.h.

Referenced by emit(), and metaSerializer().

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