]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.h
MFC r355940:
[FreeBSD/FreeBSD.git] / contrib / llvm-project / lldb / source / Plugins / LanguageRuntime / ObjC / AppleObjCRuntime / AppleObjCDeclVendor.h
1 //===-- AppleObjCDeclVendor.h -----------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8
9 #ifndef liblldb_AppleObjCDeclVendor_h_
10 #define liblldb_AppleObjCDeclVendor_h_
11
12 #include "lldb/Symbol/ClangASTContext.h"
13 #include "lldb/Symbol/DeclVendor.h"
14 #include "lldb/lldb-private.h"
15
16 #include "Plugins/LanguageRuntime/ObjC/ObjCLanguageRuntime.h"
17
18 namespace lldb_private {
19
20 class AppleObjCExternalASTSource;
21
22 class AppleObjCDeclVendor : public DeclVendor {
23 public:
24   AppleObjCDeclVendor(ObjCLanguageRuntime &runtime);
25
26   uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
27                      std::vector<clang::NamedDecl *> &decls) override;
28
29   clang::ExternalASTMerger::ImporterSource GetImporterSource() override;
30
31   friend class AppleObjCExternalASTSource;
32
33 private:
34   clang::ObjCInterfaceDecl *GetDeclForISA(ObjCLanguageRuntime::ObjCISA isa);
35   bool FinishDecl(clang::ObjCInterfaceDecl *decl);
36
37   ObjCLanguageRuntime &m_runtime;
38   ClangASTContext m_ast_ctx;
39   ObjCLanguageRuntime::EncodingToTypeSP m_type_realizer_sp;
40   AppleObjCExternalASTSource *m_external_source;
41
42   typedef llvm::DenseMap<ObjCLanguageRuntime::ObjCISA,
43                          clang::ObjCInterfaceDecl *>
44       ISAToInterfaceMap;
45
46   ISAToInterfaceMap m_isa_to_interface;
47 };
48
49 } // namespace lldb_private
50
51 #endif // liblldb_AppleObjCDeclVendor_h_