class Input

Declaration

class Input : public IO { /* full declaration omitted */ };

Description

The Input class is used to parse a yaml document into in-memory structs and vectors. It works by using YAMLParser to do a syntax parse of the entire yaml document, then the Input class builds a graph of HNodes which wraps each yaml Node. The extra layer is buffering. The low level yaml parser only lets you look at each node once. The buffering layer lets you search and interate multiple times. This is necessary because the mapRequired() method calls may not be in the same order as the keys in the document.

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1416

Inherits from: IO

Member Variables

private llvm::SourceMgr SrcMgr
private std::unique_ptr<llvm::yaml::Stream> Strm
private std::unique_ptr<HNode> TopNode
private std::error_code EC
private llvm::BumpPtrAllocator StringAllocator
private llvm::yaml::document_iterator DocIterator
private llvm::BitVector BitValuesUsed
private llvm::yaml::Input::HNode* CurrentNode = nullptr
private bool ScalarMatchFound = false
private bool AllowUnknownKeys = false

Method Overview

Inherited from IO:

Methods

Input(llvm::MemoryBufferRef Input,
      void* Ctxt = nullptr,
      SourceMgr::DiagHandlerTy DiagHandler =
          nullptr,
      void* DiagHandlerCtxt = nullptr)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1425

Parameters

llvm::MemoryBufferRef Input
void* Ctxt = nullptr
SourceMgr::DiagHandlerTy DiagHandler = nullptr
void* DiagHandlerCtxt = nullptr

Input(llvm::StringRef InputContent,
      void* Ctxt = nullptr,
      SourceMgr::DiagHandlerTy DiagHandler =
          nullptr,
      void* DiagHandlerCtxt = nullptr)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1421

Parameters

llvm::StringRef InputContent
void* Ctxt = nullptr
SourceMgr::DiagHandlerTy DiagHandler = nullptr
void* DiagHandlerCtxt = nullptr

bool beginBitSetScalar(bool&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1456

Parameters

bool&

void beginEnumScalar()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1452

void beginFlowMapping()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1442

unsigned int beginFlowSequence()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1448

void beginMapping()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1437

unsigned int beginSequence()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1444

bool bitSetMatch(const char*, bool)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1457

Parameters

const char*
bool

void blockScalarString(llvm::StringRef&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1460

Parameters

llvm::StringRef&

bool canElideEmptySequence()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1464

std::unique_ptr<Input::HNode> createHNodes(
    llvm::yaml::Node* node)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1542

Parameters

llvm::yaml::Node* node

void endBitSetScalar()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1458

void endEnumScalar()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1455

void endFlowMapping()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1443

void endFlowSequence()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1451

void endMapping()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1438

void endSequence()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1445

std::error_code error()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1432

const llvm::yaml::Node* getCurrentNode() const

Description

Returns the current node that's being parsed by the YAML Parser.

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1558

llvm::yaml::NodeKind getNodeKind()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1462

std::vector<StringRef> keys()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1441

bool mapTag(llvm::StringRef, bool)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1436

Parameters

llvm::StringRef
bool

bool matchEnumFallback()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1454

bool matchEnumScalar(const char*, bool)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1453

Parameters

const char*
bool

bool nextDocument()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1555

bool outputting() const

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1435

void postflightElement(void*)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1447

Parameters

void*

void postflightFlowElement(void*)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1450

Parameters

void*

void postflightKey(void*)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1440

Parameters

void*

bool preflightElement(unsigned int index, void*&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1446

Parameters

unsigned int index
void*&

bool preflightFlowElement(unsigned int, void*&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1449

Parameters

unsigned int
void*&

bool preflightKey(const char*,
                  bool,
                  bool,
                  bool&,
                  void*&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1439

Parameters

const char*
bool
bool
bool&
void*&

void reportWarning(const llvm::SMRange& Range,
                   const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1549

Parameters

const llvm::SMRange& Range
const llvm::Twine& message

void reportWarning(llvm::yaml::Node* hnode,
                   const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1548

Parameters

llvm::yaml::Node* hnode
const llvm::Twine& message

void reportWarning(
    llvm::yaml::Input::HNode* hnode,
    const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1547

Parameters

llvm::yaml::Input::HNode* hnode
const llvm::Twine& message

void scalarString(llvm::StringRef&,
                  llvm::yaml::QuotingType)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1459

Parameters

llvm::StringRef&
llvm::yaml::QuotingType

void scalarTag(std::string&)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1461

Parameters

std::string&

void setAllowUnknownKeys(bool Allow)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1560

Parameters

bool Allow

bool setCurrentDocument()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1554

void setError(const llvm::SMRange& Range,
              const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1545

Parameters

const llvm::SMRange& Range
const llvm::Twine& message

void setError(llvm::yaml::Node* node,
              const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1544

Parameters

llvm::yaml::Node* node
const llvm::Twine& message

void setError(llvm::yaml::Input::HNode* hnode,
              const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1543

Parameters

llvm::yaml::Input::HNode* hnode
const llvm::Twine& message

void setError(const llvm::Twine& message)

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1463

Parameters

const llvm::Twine& message

~Input()

Declared at: llvm/include/llvm/Support/YAMLTraits.h:1429