llvm/llvm/lib/Support/YAMLTraits.cpp

//===- lib/Support/YAMLTraits.cpp -----------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "llvm/Support/YAMLTraits.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/Errc.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/Format.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/VersionTuple.h"
#include "llvm/Support/YAMLParser.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <cassert>
#include <cstdint>
#include <cstring>
#include <string>
#include <vector>

usingnamespacellvm;
usingnamespaceyaml;

//===----------------------------------------------------------------------===//
//  IO
//===----------------------------------------------------------------------===//

IO::IO(void *Context) :{}

IO::~IO() = default;

void *IO::getContext() const {}

void IO::setContext(void *Context) {}

void IO::setAllowUnknownKeys(bool Allow) {}

//===----------------------------------------------------------------------===//
//  Input
//===----------------------------------------------------------------------===//

Input::Input(StringRef InputContent, void *Ctxt,
             SourceMgr::DiagHandlerTy DiagHandler, void *DiagHandlerCtxt)
    :{}

Input::Input(MemoryBufferRef Input, void *Ctxt,
             SourceMgr::DiagHandlerTy DiagHandler, void *DiagHandlerCtxt)
    :{}

Input::~Input() = default;

std::error_code Input::error() {}

bool Input::outputting() const {}

bool Input::setCurrentDocument() {}

bool Input::nextDocument() {}

const Node *Input::getCurrentNode() const {}

bool Input::mapTag(StringRef Tag, bool Default) {}

void Input::beginMapping() {}

std::vector<StringRef> Input::keys() {}

bool Input::preflightKey(const char *Key, bool Required, bool, bool &UseDefault,
                         void *&SaveInfo) {}

void Input::postflightKey(void *saveInfo) {}

void Input::endMapping() {}

void Input::beginFlowMapping() {}

void Input::endFlowMapping() {}

unsigned Input::beginSequence() {}

void Input::endSequence() {}

bool Input::preflightElement(unsigned Index, void *&SaveInfo) {}

void Input::postflightElement(void *SaveInfo) {}

unsigned Input::beginFlowSequence() {}

bool Input::preflightFlowElement(unsigned index, void *&SaveInfo) {}

void Input::postflightFlowElement(void *SaveInfo) {}

void Input::endFlowSequence() {}

void Input::beginEnumScalar() {}

bool Input::matchEnumScalar(const char *Str, bool) {}

bool Input::matchEnumFallback() {}

void Input::endEnumScalar() {}

bool Input::beginBitSetScalar(bool &DoClear) {}

bool Input::bitSetMatch(const char *Str, bool) {}

void Input::endBitSetScalar() {}

void Input::scalarString(StringRef &S, QuotingType) {}

void Input::blockScalarString(StringRef &S) {}

void Input::scalarTag(std::string &Tag) {}

void Input::setError(HNode *hnode, const Twine &message) {}

NodeKind Input::getNodeKind() {}

void Input::setError(Node *node, const Twine &message) {}

void Input::setError(const SMRange &range, const Twine &message) {}

void Input::reportWarning(HNode *hnode, const Twine &message) {}

void Input::reportWarning(Node *node, const Twine &message) {}

void Input::reportWarning(const SMRange &range, const Twine &message) {}

void Input::releaseHNodeBuffers() {}

Input::HNode *Input::createHNodes(Node *N) {}

void Input::setError(const Twine &Message) {}

void Input::setAllowUnknownKeys(bool Allow) {}

bool Input::canElideEmptySequence() {}

//===----------------------------------------------------------------------===//
//  Output
//===----------------------------------------------------------------------===//

Output::Output(raw_ostream &yout, void *context, int WrapColumn)
    :{}

Output::~Output() = default;

bool Output::outputting() const {}

void Output::beginMapping() {}

bool Output::mapTag(StringRef Tag, bool Use) {}

void Output::endMapping() {}

std::vector<StringRef> Output::keys() {}

bool Output::preflightKey(const char *Key, bool Required, bool SameAsDefault,
                          bool &UseDefault, void *&SaveInfo) {}

void Output::postflightKey(void *) {}

void Output::beginFlowMapping() {}

void Output::endFlowMapping() {}

void Output::beginDocuments() {}

bool Output::preflightDocument(unsigned index) {}

void Output::postflightDocument() {}

void Output::endDocuments() {}

unsigned Output::beginSequence() {}

void Output::endSequence() {}

bool Output::preflightElement(unsigned, void *&SaveInfo) {}

void Output::postflightElement(void *) {}

unsigned Output::beginFlowSequence() {}

void Output::endFlowSequence() {}

bool Output::preflightFlowElement(unsigned, void *&SaveInfo) {}

void Output::postflightFlowElement(void *) {}

void Output::beginEnumScalar() {}

bool Output::matchEnumScalar(const char *Str, bool Match) {}

bool Output::matchEnumFallback() {}

void Output::endEnumScalar() {}

bool Output::beginBitSetScalar(bool &DoClear) {}

bool Output::bitSetMatch(const char *Str, bool Matches) {}

void Output::endBitSetScalar() {}

void Output::scalarString(StringRef &S, QuotingType MustQuote) {}

void Output::blockScalarString(StringRef &S) {}

void Output::scalarTag(std::string &Tag) {}

void Output::setError(const Twine &message) {}

bool Output::canElideEmptySequence() {}

void Output::output(StringRef s) {}

void Output::output(StringRef S, QuotingType MustQuote) {}

void Output::outputUpToEndOfLine(StringRef s) {}

void Output::outputNewLine() {}

// if seq at top, indent as if map, then add "- "
// if seq in middle, use "- " if firstKey, else use "  "
//

void Output::newLineCheck(bool EmptySequence) {}

void Output::paddedKey(StringRef key) {}

void Output::flowKey(StringRef Key) {}

NodeKind Output::getNodeKind() {}

bool Output::inSeqAnyElement(InState State) {}

bool Output::inFlowSeqAnyElement(InState State) {}

bool Output::inMapAnyKey(InState State) {}

bool Output::inFlowMapAnyKey(InState State) {}

//===----------------------------------------------------------------------===//
//  traits for built-in types
//===----------------------------------------------------------------------===//

void ScalarTraits<bool>::output(const bool &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<bool>::input(StringRef Scalar, void *, bool &Val) {}

void ScalarTraits<StringRef>::output(const StringRef &Val, void *,
                                     raw_ostream &Out) {}

StringRef ScalarTraits<StringRef>::input(StringRef Scalar, void *,
                                         StringRef &Val) {}

void ScalarTraits<std::string>::output(const std::string &Val, void *,
                                       raw_ostream &Out) {}

StringRef ScalarTraits<std::string>::input(StringRef Scalar, void *,
                                           std::string &Val) {}

void ScalarTraits<uint8_t>::output(const uint8_t &Val, void *,
                                   raw_ostream &Out) {}

StringRef ScalarTraits<uint8_t>::input(StringRef Scalar, void *, uint8_t &Val) {}

void ScalarTraits<uint16_t>::output(const uint16_t &Val, void *,
                                    raw_ostream &Out) {}

StringRef ScalarTraits<uint16_t>::input(StringRef Scalar, void *,
                                        uint16_t &Val) {}

void ScalarTraits<uint32_t>::output(const uint32_t &Val, void *,
                                    raw_ostream &Out) {}

StringRef ScalarTraits<uint32_t>::input(StringRef Scalar, void *,
                                        uint32_t &Val) {}

void ScalarTraits<uint64_t>::output(const uint64_t &Val, void *,
                                    raw_ostream &Out) {}

StringRef ScalarTraits<uint64_t>::input(StringRef Scalar, void *,
                                        uint64_t &Val) {}

void ScalarTraits<int8_t>::output(const int8_t &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<int8_t>::input(StringRef Scalar, void *, int8_t &Val) {}

void ScalarTraits<int16_t>::output(const int16_t &Val, void *,
                                   raw_ostream &Out) {}

StringRef ScalarTraits<int16_t>::input(StringRef Scalar, void *, int16_t &Val) {}

void ScalarTraits<int32_t>::output(const int32_t &Val, void *,
                                   raw_ostream &Out) {}

StringRef ScalarTraits<int32_t>::input(StringRef Scalar, void *, int32_t &Val) {}

void ScalarTraits<int64_t>::output(const int64_t &Val, void *,
                                   raw_ostream &Out) {}

StringRef ScalarTraits<int64_t>::input(StringRef Scalar, void *, int64_t &Val) {}

void ScalarTraits<double>::output(const double &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<double>::input(StringRef Scalar, void *, double &Val) {}

void ScalarTraits<float>::output(const float &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<float>::input(StringRef Scalar, void *, float &Val) {}

void ScalarTraits<Hex8>::output(const Hex8 &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<Hex8>::input(StringRef Scalar, void *, Hex8 &Val) {}

void ScalarTraits<Hex16>::output(const Hex16 &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<Hex16>::input(StringRef Scalar, void *, Hex16 &Val) {}

void ScalarTraits<Hex32>::output(const Hex32 &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<Hex32>::input(StringRef Scalar, void *, Hex32 &Val) {}

void ScalarTraits<Hex64>::output(const Hex64 &Val, void *, raw_ostream &Out) {}

StringRef ScalarTraits<Hex64>::input(StringRef Scalar, void *, Hex64 &Val) {}

void ScalarTraits<VersionTuple>::output(const VersionTuple &Val, void *,
                                        llvm::raw_ostream &Out) {}

StringRef ScalarTraits<VersionTuple>::input(StringRef Scalar, void *,
                                            VersionTuple &Val) {}