llvm/llvm/lib/InterfaceStub/IFSHandler.cpp

//===- IFSHandler.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/InterfaceStub/IFSHandler.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/BinaryFormat/ELF.h"
#include "llvm/InterfaceStub/IFSStub.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/GlobPattern.h"
#include "llvm/Support/LineIterator.h"
#include "llvm/Support/YAMLTraits.h"
#include "llvm/TargetParser/Triple.h"
#include <functional>
#include <optional>

usingnamespacellvm;
usingnamespacellvm::ifs;

LLVM_YAML_IS_SEQUENCE_VECTOR(IFSSymbol)

namespace llvm {
namespace yaml {

/// YAML traits for ELFSymbolType.
template <> struct ScalarEnumerationTraits<IFSSymbolType> {};

template <> struct ScalarTraits<IFSEndiannessType> {};

template <> struct ScalarTraits<IFSBitWidthType> {};

template <> struct MappingTraits<IFSTarget> {};

/// YAML traits for ELFSymbol.
template <> struct MappingTraits<IFSSymbol> {};

/// YAML traits for ELFStub objects.
template <> struct MappingTraits<IFSStub> {};

/// YAML traits for ELFStubTriple objects.
template <> struct MappingTraits<IFSStubTriple> {};
} // end namespace yaml
} // end namespace llvm

/// Attempt to determine if a Text stub uses target triple.
bool usesTriple(StringRef Buf) {}

Expected<std::unique_ptr<IFSStub>> ifs::readIFSFromBuffer(StringRef Buf) {}

Error ifs::writeIFSToOutputStream(raw_ostream &OS, const IFSStub &Stub) {}

Error ifs::overrideIFSTarget(
    IFSStub &Stub, std::optional<IFSArch> OverrideArch,
    std::optional<IFSEndiannessType> OverrideEndianness,
    std::optional<IFSBitWidthType> OverrideBitWidth,
    std::optional<std::string> OverrideTriple) {}

Error ifs::validateIFSTarget(IFSStub &Stub, bool ParseTriple) {}

IFSTarget ifs::parseTriple(StringRef TripleStr) {}

void ifs::stripIFSTarget(IFSStub &Stub, bool StripTriple, bool StripArch,
                         bool StripEndianness, bool StripBitWidth) {}

Error ifs::filterIFSSyms(IFSStub &Stub, bool StripUndefined,
                         const std::vector<std::string> &Exclude) {}