llvm/llvm/lib/Remarks/YAMLRemarkParser.cpp

//===- YAMLRemarkParser.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
//
//===----------------------------------------------------------------------===//
//
// This file provides utility methods used by clients that want to use the
// parser for remark diagnostics in LLVM.
//
//===----------------------------------------------------------------------===//

#include "YAMLRemarkParser.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/Support/Endian.h"
#include "llvm/Support/Path.h"
#include <optional>

usingnamespacellvm;
usingnamespacellvm::remarks;

char YAMLParseError::ID =;

static void handleDiagnostic(const SMDiagnostic &Diag, void *Ctx) {}

YAMLParseError::YAMLParseError(StringRef Msg, SourceMgr &SM,
                               yaml::Stream &Stream, yaml::Node &Node) {}

static SourceMgr setupSM(std::string &LastErrorMessage) {}

// Parse the magic number. This function returns true if this represents remark
// metadata, false otherwise.
static Expected<bool> parseMagic(StringRef &Buf) {}

static Expected<uint64_t> parseVersion(StringRef &Buf) {}

static Expected<uint64_t> parseStrTabSize(StringRef &Buf) {}

static Expected<ParsedStringTable> parseStrTab(StringRef &Buf,
                                               uint64_t StrTabSize) {}

Expected<std::unique_ptr<YAMLRemarkParser>> remarks::createYAMLParserFromMeta(
    StringRef Buf, std::optional<ParsedStringTable> StrTab,
    std::optional<StringRef> ExternalFilePrependPath) {}

YAMLRemarkParser::YAMLRemarkParser(StringRef Buf)
    :{}

YAMLRemarkParser::YAMLRemarkParser(StringRef Buf,
                                   std::optional<ParsedStringTable> StrTab)
    :{}

Error YAMLRemarkParser::error(StringRef Message, yaml::Node &Node) {}

Error YAMLRemarkParser::error() {}

Expected<std::unique_ptr<Remark>>
YAMLRemarkParser::parseRemark(yaml::Document &RemarkEntry) {}

Expected<Type> YAMLRemarkParser::parseType(yaml::MappingNode &Node) {}

Expected<StringRef> YAMLRemarkParser::parseKey(yaml::KeyValueNode &Node) {}

Expected<StringRef> YAMLRemarkParser::parseStr(yaml::KeyValueNode &Node) {}

Expected<unsigned> YAMLRemarkParser::parseUnsigned(yaml::KeyValueNode &Node) {}

Expected<RemarkLocation>
YAMLRemarkParser::parseDebugLoc(yaml::KeyValueNode &Node) {}

Expected<Argument> YAMLRemarkParser::parseArg(yaml::Node &Node) {}

Expected<std::unique_ptr<Remark>> YAMLRemarkParser::next() {}

Expected<StringRef> YAMLStrTabRemarkParser::parseStr(yaml::KeyValueNode &Node) {}