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:1387

Inherits from: IO

Method Overview

  • public Input(llvm::StringRef InputContent, void * Ctxt = nullptr, SourceMgr::DiagHandlerTy DiagHandler = nullptr, void * DiagHandlerCtxt = nullptr)
  • public Input(llvm::MemoryBufferRef Input, void * Ctxt = nullptr, SourceMgr::DiagHandlerTy DiagHandler = nullptr, void * DiagHandlerCtxt = nullptr)
  • public std::error_code error()
  • public const llvm::yaml::Node * getCurrentNode() const
  • public bool nextDocument()
  • public bool setCurrentDocument()
  • public ~Input()

Inherited from IO:

Methods

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

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

Parameters

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

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

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

Parameters

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

std::error_code error()

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

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:1523

bool nextDocument()

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

bool setCurrentDocument()

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

~Input()

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