clang 10.0.0git

Namespaces | Macros | Functions
SerializedDiagnosticPrinter.cpp File Reference
`#include "clang/Frontend/SerializedDiagnosticPrinter.h"`
`#include "clang/Basic/Diagnostic.h"`
`#include "clang/Basic/DiagnosticOptions.h"`
`#include "clang/Basic/SourceManager.h"`
`#include "clang/Frontend/DiagnosticRenderer.h"`
`#include "clang/Frontend/FrontendDiagnostic.h"`
`#include "clang/Frontend/SerializedDiagnosticReader.h"`
`#include "clang/Frontend/SerializedDiagnostics.h"`
`#include "clang/Frontend/TextDiagnosticPrinter.h"`
`#include "clang/Lex/Lexer.h"`
`#include "llvm/ADT/DenseSet.h"`
`#include "llvm/ADT/STLExtras.h"`
`#include "llvm/ADT/SmallString.h"`
`#include "llvm/ADT/StringRef.h"`
`#include "llvm/Bitstream/BitCodes.h"`
`#include "llvm/Bitstream/BitstreamReader.h"`
`#include "llvm/Support/raw_ostream.h"`
`#include <utility>`
Include dependency graph for SerializedDiagnosticPrinter.cpp:

Go to the source code of this file.

## Namespaces
| clang
| Dataflow Directional Tag Classes.
| clang::serialized_diags

## Macros
#define | CASE(X) case DiagnosticsEngine::X: return serialized_diags::X;

## Functions
std::unique_ptr< DiagnosticConsumer > | clang::serialized_diags::create (StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
| Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file. More...
static void | EmitBlockID (unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, RecordDataImpl &Record)
| Emits a block ID in the BLOCKINFO block. More...
static void | EmitRecordID (unsigned ID, const char *Name, llvm::BitstreamWriter &Stream, RecordDataImpl &Record)
| Emits a record ID in the BLOCKINFO block. More...
static void | AddSourceLocationAbbrev (llvm::BitCodeAbbrev &Abbrev)
static void | AddRangeLocationAbbrev (llvm::BitCodeAbbrev &Abbrev)
static serialized_diags::Level | getStableLevel (DiagnosticsEngine::Level Level)

## Macro Definition Documentation

## ◆ CASE

#define CASE | ( |  | X | ) | case DiagnosticsEngine::X: return serialized_diags::X;

Referenced by getStableLevel().

## Function Documentation

## ◆ AddRangeLocationAbbrev()

static void AddRangeLocationAbbrev | ( | llvm::BitCodeAbbrev & | Abbrev | ) |
| static

Definition at line 419 of file SerializedDiagnosticPrinter.cpp.

References AddSourceLocationAbbrev(), clang::serialized_diags::BLOCK_DIAG, clang::serialized_diags::BLOCK_META, EmitBlockID(), EmitRecordID(), clang::Diagnostic::FormatDiagnostic(), clang::DiagnosticIDs::getCategoryNameFromID(), clang::Diagnostic::getFixItHints(), clang::Diagnostic::getLocation(), clang::Diagnostic::getRanges(), clang::Diagnostic::getSourceManager(), clang::DiagnosticIDs::getWarningOptionForDiag(), clang::Diagnostic::hasSourceManager(), clang::SourceLocation::isInvalid(), clang::DiagnosticsEngine::Note, clang::serialized_diags::RECORD_CATEGORY, clang::serialized_diags::RECORD_DIAG, clang::serialized_diags::RECORD_DIAG_FLAG, clang::serialized_diags::RECORD_FILENAME, clang::serialized_diags::RECORD_FIXIT, clang::serialized_diags::RECORD_SOURCE_RANGE, clang::serialized_diags::RECORD_VERSION, State, and clang::serialized_diags::VersionNumber.

## ◆ AddSourceLocationAbbrev()

static void AddSourceLocationAbbrev | ( | llvm::BitCodeAbbrev & | Abbrev | ) |
| static

Definition at line 411 of file SerializedDiagnosticPrinter.cpp.

Referenced by AddRangeLocationAbbrev().

## ◆ EmitBlockID()

static void EmitBlockID | ( | unsigned | ID,
|  | const char * | Name,
|  | llvm::BitstreamWriter & | Stream,
|  | RecordDataImpl & | Record
| ) |  |
| static

Emits a block ID in the BLOCKINFO block.

Definition at line 310 of file SerializedDiagnosticPrinter.cpp.

Referenced by AddRangeLocationAbbrev().

## ◆ EmitRecordID()

static void EmitRecordID | ( | unsigned | ID,
|  | const char * | Name,
|  | llvm::BitstreamWriter & | Stream,
|  | RecordDataImpl & | Record
| ) |  |
| static

Emits a record ID in the BLOCKINFO block.

Definition at line 330 of file SerializedDiagnosticPrinter.cpp.

Referenced by AddRangeLocationAbbrev().

## ◆ getStableLevel()

static serialized_diags::Level getStableLevel | ( | DiagnosticsEngine::Level | Level | ) |
| static

Definition at line 612 of file SerializedDiagnosticPrinter.cpp.

References clang::serialized_diags::BLOCK_DIAG, CASE, Category, clang::FixItHint::CodeToInsert, clang::serialized_diags::Location::Col, End, clang::serialized_diags::Fatal, clang::serialized_diags::Location::FileID, clang::DiagnosticIDs::getCategoryNumberForDiag(), clang::Diagnostic::getID(), clang::FullSourceLoc::getManager(), clang::FullSourceLoc::getPresumedLoc(), clang::FullSourceLoc::hasManager(), clang::serialized_diags::Ignored, clang::FixItHint::isNull(), clang::serialized_diags::Location::Line, clang::serialized_diags::Note, clang::DiagnosticsEngine::Note, clang::serialized_diags::Location::Offset, clang::serialized_diags::RECORD_DIAG, clang::serialized_diags::RECORD_FIXIT, clang::serialized_diags::RECORD_SOURCE_RANGE, clang::serialized_diags::Remark, clang::transformer::remove(), clang::FixItHint::RemoveRange, State, Text, and clang::serialized_diags::Warning.