llvm/clang/lib/InstallAPI/DylibVerifier.cpp

//===- DylibVerifier.cpp ----------------------------------------*- C++--*-===//
//
// 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 "clang/InstallAPI/DylibVerifier.h"
#include "DiagnosticBuilderWrappers.h"
#include "clang/InstallAPI/FrontendRecords.h"
#include "clang/InstallAPI/InstallAPIDiagnostic.h"
#include "llvm/Demangle/Demangle.h"
#include "llvm/TextAPI/DylibReader.h"

usingnamespacellvm::MachO;

namespace clang {
namespace installapi {

/// Metadata stored about a mapping of a declaration to a symbol.
struct DylibVerifier::SymbolContext {};

struct DylibVerifier::DWARFContext {};

static bool isCppMangled(StringRef Name) {}

static std::string demangle(StringRef Name) {}

std::string DylibVerifier::getAnnotatedName(const Record *R,
                                            SymbolContext &SymCtx,
                                            bool ValidSourceLoc) {}

static DylibVerifier::Result updateResult(const DylibVerifier::Result Prev,
                                          const DylibVerifier::Result Curr) {}
// __private_extern__ is a deprecated specifier that clang does not
// respect in all contexts, it should just be considered hidden for InstallAPI.
static bool shouldIgnorePrivateExternAttr(const Decl *D) {}

Record *findRecordFromSlice(const RecordsSlice *Slice, StringRef Name,
                            EncodeKind Kind) {}

void DylibVerifier::updateState(Result State) {}

void DylibVerifier::addSymbol(const Record *R, SymbolContext &SymCtx,
                              TargetList &&Targets) {}

bool DylibVerifier::shouldIgnoreObsolete(const Record *R, SymbolContext &SymCtx,
                                         const Record *DR) {}

bool DylibVerifier::shouldIgnoreReexport(const Record *R,
                                         SymbolContext &SymCtx) const {}

bool DylibVerifier::shouldIgnoreInternalZipperedSymbol(
    const Record *R, const SymbolContext &SymCtx) const {}

bool DylibVerifier::shouldIgnoreZipperedAvailability(const Record *R,
                                                     SymbolContext &SymCtx) {}

bool DylibVerifier::compareObjCInterfaceSymbols(const Record *R,
                                                SymbolContext &SymCtx,
                                                const ObjCInterfaceRecord *DR) {}

DylibVerifier::Result DylibVerifier::compareVisibility(const Record *R,
                                                       SymbolContext &SymCtx,
                                                       const Record *DR) {}

DylibVerifier::Result DylibVerifier::compareAvailability(const Record *R,
                                                         SymbolContext &SymCtx,
                                                         const Record *DR) {}

bool DylibVerifier::compareSymbolFlags(const Record *R, SymbolContext &SymCtx,
                                       const Record *DR) {}

DylibVerifier::Result DylibVerifier::verifyImpl(Record *R,
                                                SymbolContext &SymCtx) {}

bool DylibVerifier::canVerify() {}

void DylibVerifier::assignSlice(const Target &T) {}

void DylibVerifier::setTarget(const Target &T) {}

void DylibVerifier::setSourceManager(
    IntrusiveRefCntPtr<SourceManager> SourceMgr) {}

DylibVerifier::Result DylibVerifier::verify(ObjCIVarRecord *R,
                                            const FrontendAttrs *FA,
                                            const StringRef SuperClass) {}

static ObjCIFSymbolKind assignObjCIFSymbolKind(const ObjCInterfaceRecord *R) {}

DylibVerifier::Result DylibVerifier::verify(ObjCInterfaceRecord *R,
                                            const FrontendAttrs *FA) {}

DylibVerifier::Result DylibVerifier::verify(GlobalRecord *R,
                                            const FrontendAttrs *FA) {}

void DylibVerifier::VerifierContext::emitDiag(llvm::function_ref<void()> Report,
                                              RecordLoc *Loc) {}

// The existence of weak-defined RTTI can not always be inferred from the
// header files because they can be generated as part of an implementation
// file.
// InstallAPI doesn't warn about weak-defined RTTI, because this doesn't affect
// static linking and so can be ignored for text-api files.
static bool shouldIgnoreCpp(StringRef Name, bool IsWeakDef) {}
void DylibVerifier::visitSymbolInDylib(const Record &R, SymbolContext &SymCtx) {}

void DylibVerifier::visitGlobal(const GlobalRecord &R) {}

void DylibVerifier::visitObjCIVar(const ObjCIVarRecord &R,
                                  const StringRef Super) {}

void DylibVerifier::accumulateSrcLocForDylibSymbols() {}

void DylibVerifier::visitObjCInterface(const ObjCInterfaceRecord &R) {}

void DylibVerifier::visitObjCCategory(const ObjCCategoryRecord &R) {}

DylibVerifier::Result DylibVerifier::verifyRemainingSymbols() {}

bool DylibVerifier::verifyBinaryAttrs(const ArrayRef<Target> ProvidedTargets,
                                      const BinaryAttrs &ProvidedBA,
                                      const LibAttrs &ProvidedReexports,
                                      const LibAttrs &ProvidedClients,
                                      const LibAttrs &ProvidedRPaths,
                                      const FileType &FT) {}

std::unique_ptr<SymbolSet> DylibVerifier::takeExports() {}

} // namespace installapi
} // namespace clang