LLVM 22.0.0git
llvm::yaml::Stream Class Reference

This class represents a YAML stream potentially containing multiple documents. More...

#include "llvm/Support/YAMLParser.h"

Public Member Functions

LLVM_ABI Stream (StringRef Input, SourceMgr &, bool ShowColors=true, std::error_code *EC=nullptr)
 This keeps a reference to the string referenced by Input.
LLVM_ABI Stream (MemoryBufferRef InputBuffer, SourceMgr &, bool ShowColors=true, std::error_code *EC=nullptr)
LLVM_ABI ~Stream ()
LLVM_ABI document_iterator begin ()
LLVM_ABI document_iterator end ()
LLVM_ABI void skip ()
LLVM_ABI bool failed ()
bool validate ()
LLVM_ABI void printError (Node *N, const Twine &Msg, SourceMgr::DiagKind Kind=SourceMgr::DK_Error)
LLVM_ABI void printError (const SMRange &Range, const Twine &Msg, SourceMgr::DiagKind Kind=SourceMgr::DK_Error)

Friends

class Document

Detailed Description

This class represents a YAML stream potentially containing multiple documents.

Definition at line 88 of file YAMLParser.h.

Constructor & Destructor Documentation

◆ Stream() [1/2]

Stream::Stream ( StringRef Input,
SourceMgr & SM,
bool ShowColors = true,
std::error_code * EC = nullptr )

This keeps a reference to the string referenced by Input.

Definition at line 1915 of file YAMLParser.cpp.

◆ Stream() [2/2]

Stream::Stream ( MemoryBufferRef InputBuffer,
SourceMgr & SM,
bool ShowColors = true,
std::error_code * EC = nullptr )

Definition at line 1919 of file YAMLParser.cpp.

◆ ~Stream()

Stream::~Stream ( )
default

References LLVM_ABI.

Member Function Documentation

◆ begin()

document_iterator Stream::begin ( )

Definition at line 1936 of file YAMLParser.cpp.

References Document, and llvm::report_fatal_error().

Referenced by llvm::vfs::RedirectingFileSystem::create().

◆ end()

document_iterator Stream::end ( )

Definition at line 1947 of file YAMLParser.cpp.

Referenced by llvm::vfs::RedirectingFileSystem::create().

◆ failed()

bool Stream::failed ( )

Definition at line 1925 of file YAMLParser.cpp.

Referenced by validate().

◆ printError() [1/2]

void Stream::printError ( const SMRange & Range,
const Twine & Msg,
SourceMgr::DiagKind Kind = SourceMgr::DK_Error )

Definition at line 1931 of file YAMLParser.cpp.

References Range.

◆ printError() [2/2]

void Stream::printError ( Node * N,
const Twine & Msg,
SourceMgr::DiagKind Kind = SourceMgr::DK_Error )

Definition at line 1927 of file YAMLParser.cpp.

References N, and printError().

Referenced by printError(), and llvm::remarks::YAMLParseError::YAMLParseError().

◆ skip()

void Stream::skip ( )

Definition at line 1951 of file YAMLParser.cpp.

References Document, and llvm::yaml::Document::skip().

Referenced by validate().

◆ validate()

bool llvm::yaml::Stream::validate ( )
inline

Definition at line 103 of file YAMLParser.h.

References failed(), and skip().

◆ Document

friend class Document
friend

Definition at line 114 of file YAMLParser.h.

References Document.

Referenced by begin(), Document, and skip().


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