12#include "clang/AST/Decl.h"
13#include "clang/AST/DeclObjC.h"
14#include "clang/Basic/Module.h"
26 clang::ObjCInterfaceDecl *objc_decl) {
31 const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment,
32 llvm::DenseMap<const clang::FieldDecl *, uint64_t> &FieldOffsets,
33 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits> &BaseOffsets,
34 llvm::DenseMap<const clang::CXXRecordDecl *, clang::CharUnits>
35 &VirtualBaseOffsets) {
37 BaseOffsets, VirtualBaseOffsets);
41 const clang::DeclContext *decl_ctx,
42 llvm::function_ref<
bool(clang::Decl::Kind)> IsKindWeWant,
45 clang::TagDecl *tag_decl = llvm::dyn_cast<clang::TagDecl>(
46 const_cast<clang::DeclContext *
>(decl_ctx));
53 const clang::DeclContext *DC, clang::DeclarationName Name) {
54 llvm::SmallVector<clang::NamedDecl *, 4> decls;
57 if (
auto *oid = llvm::dyn_cast<clang::ObjCInterfaceDecl>(DC)) {
58 clang::ObjCContainerDecl::method_range noload_methods(oid->noload_decls());
59 for (
auto *omd : noload_methods)
60 if (omd->getDeclName() == Name)
63 return !SetExternalVisibleDeclsForName(DC, Name, decls).empty();
70 m_ids.insert({module,
id});
74std::optional<clang::ASTSourceDescriptor>
76 if (clang::Module *module =
getModule(
id))
static char ID
LLVM RTTI support.
std::vector< clang::Module * > m_modules
bool FindExternalVisibleDeclsByName(const clang::DeclContext *DC, clang::DeclarationName Name) override
OptionalClangModuleID RegisterModule(clang::Module *module)
std::optional< clang::ASTSourceDescriptor > getSourceDescriptor(unsigned ID) override
Module-related methods.
void CompleteType(clang::TagDecl *tag_decl) override
OptionalClangModuleID GetIDForModule(clang::Module *module)
clang::Module * getModule(unsigned ID) override
bool layoutRecordType(const clang::RecordDecl *Record, uint64_t &Size, uint64_t &Alignment, llvm::DenseMap< const clang::FieldDecl *, uint64_t > &FieldOffsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &BaseOffsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &VirtualBaseOffsets) override
void FindExternalLexicalDecls(const clang::DeclContext *DC, llvm::function_ref< bool(clang::Decl::Kind)> IsKindWeWant, llvm::SmallVectorImpl< clang::Decl * > &Result) override
llvm::DenseMap< clang::Module *, unsigned > m_ids
void CompleteTagDecl(clang::TagDecl *)
bool LayoutRecordType(const clang::RecordDecl *record_decl, uint64_t &size, uint64_t &alignment, llvm::DenseMap< const clang::FieldDecl *, uint64_t > &field_offsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &base_offsets, llvm::DenseMap< const clang::CXXRecordDecl *, clang::CharUnits > &vbase_offsets)
void CompleteObjCInterfaceDecl(clang::ObjCInterfaceDecl *)
A class that represents a running process on the host machine.