llvm/clang/lib/InstallAPI/Visitor.cpp

//===- Visitor.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/Visitor.h"
#include "clang/AST/Availability.h"
#include "clang/AST/ParentMapContext.h"
#include "clang/AST/VTableBuilder.h"
#include "clang/Basic/Linkage.h"
#include "clang/InstallAPI/DylibVerifier.h"
#include "clang/InstallAPI/FrontendRecords.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Mangler.h"

usingnamespacellvm;
usingnamespacellvm::MachO;

namespace {
enum class CXXLinkage {};
}

namespace clang::installapi {

// Exported NamedDecl needs to have external linkage and
// default visibility from LinkageComputer.
static bool isExported(const NamedDecl *D) {}

static bool isInlined(const FunctionDecl *D) {}

static SymbolFlags getFlags(bool WeakDef, bool ThreadLocal = false) {}

void InstallAPIVisitor::HandleTranslationUnit(ASTContext &ASTCtx) {}

std::string InstallAPIVisitor::getMangledName(const NamedDecl *D) const {}

std::string InstallAPIVisitor::getBackendMangledName(Twine Name) const {}

std::optional<HeaderType>
InstallAPIVisitor::getAccessForDecl(const NamedDecl *D) const {}

/// Check if the interface itself or any of its super classes have an
/// exception attribute. InstallAPI needs to export an additional symbol
/// ("OBJC_EHTYPE_$CLASS_NAME") if any of the classes have the exception
/// attribute.
static bool hasObjCExceptionAttribute(const ObjCInterfaceDecl *D) {}
void InstallAPIVisitor::recordObjCInstanceVariables(
    const ASTContext &ASTCtx, ObjCContainerRecord *Record, StringRef SuperClass,
    const llvm::iterator_range<
        DeclContext::specific_decl_iterator<ObjCIvarDecl>>
        Ivars) {}

bool InstallAPIVisitor::VisitObjCInterfaceDecl(const ObjCInterfaceDecl *D) {}

bool InstallAPIVisitor::VisitObjCCategoryDecl(const ObjCCategoryDecl *D) {}

bool InstallAPIVisitor::VisitVarDecl(const VarDecl *D) {}

bool InstallAPIVisitor::VisitFunctionDecl(const FunctionDecl *D) {}

static bool hasVTable(const CXXRecordDecl *D) {}

static CXXLinkage getVTableLinkage(const CXXRecordDecl *D) {}

static bool isRTTIWeakDef(const CXXRecordDecl *D) {}

static bool hasRTTI(const CXXRecordDecl *D) {}

std::string
InstallAPIVisitor::getMangledCXXRTTIName(const CXXRecordDecl *D) const {}

std::string InstallAPIVisitor::getMangledCXXRTTI(const CXXRecordDecl *D) const {}

std::string
InstallAPIVisitor::getMangledCXXVTableName(const CXXRecordDecl *D) const {}

std::string InstallAPIVisitor::getMangledCXXThunk(
    const GlobalDecl &D, const ThunkInfo &Thunk, bool ElideOverrideInfo) const {}

std::string InstallAPIVisitor::getMangledCtorDtor(const CXXMethodDecl *D,
                                                  int Type) const {}

void InstallAPIVisitor::emitVTableSymbols(const CXXRecordDecl *D,
                                          const AvailabilityInfo &Avail,
                                          const HeaderType Access,
                                          bool EmittedVTable) {}

bool InstallAPIVisitor::VisitCXXRecordDecl(const CXXRecordDecl *D) {}

} // namespace clang::installapi