llvm/llvm/lib/Remarks/BitstreamRemarkParser.cpp

//===- BitstreamRemarkParser.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 "llvm/Remarks/BitstreamRemarkParser.h"
#include "BitstreamRemarkParser.h"
#include "llvm/Remarks/Remark.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/Path.h"
#include <optional>

usingnamespacellvm;
usingnamespacellvm::remarks;

static Error unknownRecord(const char *BlockName, unsigned RecordID) {}

static Error malformedRecord(const char *BlockName, const char *RecordName) {}

BitstreamMetaParserHelper::BitstreamMetaParserHelper(
    BitstreamCursor &Stream, BitstreamBlockInfo &BlockInfo)
    :{}

/// Parse a record and fill in the fields in the parser.
static Error parseRecord(BitstreamMetaParserHelper &Parser, unsigned Code) {}

BitstreamRemarkParserHelper::BitstreamRemarkParserHelper(
    BitstreamCursor &Stream)
    :{}

/// Parse a record and fill in the fields in the parser.
static Error parseRecord(BitstreamRemarkParserHelper &Parser, unsigned Code) {}

template <typename T>
static Error parseBlock(T &ParserHelper, unsigned BlockID,
                        const char *BlockName) {}

Error BitstreamMetaParserHelper::parse() {}

Error BitstreamRemarkParserHelper::parse() {}

BitstreamParserHelper::BitstreamParserHelper(StringRef Buffer)
    :{}

Expected<std::array<char, 4>> BitstreamParserHelper::parseMagic() {}

Error BitstreamParserHelper::parseBlockInfoBlock() {}

static Expected<bool> isBlock(BitstreamCursor &Stream, unsigned BlockID) {}

Expected<bool> BitstreamParserHelper::isMetaBlock() {}

Expected<bool> BitstreamParserHelper::isRemarkBlock() {}

static Error validateMagicNumber(StringRef MagicNumber) {}

static Error advanceToMetaBlock(BitstreamParserHelper &Helper) {}

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

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

Error BitstreamRemarkParser::parseMeta() {}

Error BitstreamRemarkParser::processCommonMeta(
    BitstreamMetaParserHelper &Helper) {}

static Error processStrTab(BitstreamRemarkParser &P,
                           std::optional<StringRef> StrTabBuf) {}

static Error processRemarkVersion(BitstreamRemarkParser &P,
                                  std::optional<uint64_t> RemarkVersion) {}

Error BitstreamRemarkParser::processExternalFilePath(
    std::optional<StringRef> ExternalFilePath) {}

Error BitstreamRemarkParser::processStandaloneMeta(
    BitstreamMetaParserHelper &Helper) {}

Error BitstreamRemarkParser::processSeparateRemarksFileMeta(
    BitstreamMetaParserHelper &Helper) {}

Error BitstreamRemarkParser::processSeparateRemarksMetaMeta(
    BitstreamMetaParserHelper &Helper) {}

Expected<std::unique_ptr<Remark>> BitstreamRemarkParser::parseRemark() {}

Expected<std::unique_ptr<Remark>>
BitstreamRemarkParser::processRemark(BitstreamRemarkParserHelper &Helper) {}