1 //===-- AppleObjCDeclVendor.h -----------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_AppleObjCDeclVendor_h_
10 #define liblldb_AppleObjCDeclVendor_h_
12 #include "lldb/Symbol/ClangASTContext.h"
13 #include "lldb/Symbol/DeclVendor.h"
14 #include "lldb/lldb-private.h"
16 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
18 namespace lldb_private {
20 class AppleObjCExternalASTSource;
22 class AppleObjCDeclVendor : public DeclVendor {
24 AppleObjCDeclVendor(ObjCLanguageRuntime &runtime);
26 uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
27 std::vector<clang::NamedDecl *> &decls) override;
29 clang::ExternalASTMerger::ImporterSource GetImporterSource() override;
31 friend class AppleObjCExternalASTSource;
34 clang::ObjCInterfaceDecl *GetDeclForISA(ObjCLanguageRuntime::ObjCISA isa);
35 bool FinishDecl(clang::ObjCInterfaceDecl *decl);
37 ObjCLanguageRuntime &m_runtime;
38 ClangASTContext m_ast_ctx;
39 ObjCLanguageRuntime::EncodingToTypeSP m_type_realizer_sp;
40 AppleObjCExternalASTSource *m_external_source;
42 typedef llvm::DenseMap<ObjCLanguageRuntime::ObjCISA,
43 clang::ObjCInterfaceDecl *>
46 ISAToInterfaceMap m_isa_to_interface;
49 } // namespace lldb_private
51 #endif // liblldb_AppleObjCDeclVendor_h_