1 //===-- AppleObjCSymbolVendor.h ---------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_AppleObjCSymbolVendor_h_ 11 #define liblldb_AppleObjCSymbolVendor_h_ 12 13 // C Includes 14 // C++ Includes 15 16 #include <map> 17 18 // Other libraries and framework includes 19 20 // Project includes 21 #include "lldb/lldb-private.h" 22 #include "lldb/Symbol/ClangASTContext.h" 23 #include "lldb/Symbol/TypeVendor.h" 24 #include "lldb/Target/ObjCLanguageRuntime.h" 25 26 namespace lldb_private { 27 28 class AppleObjCExternalASTSource; 29 30 class AppleObjCTypeVendor : public TypeVendor 31 { 32 public: 33 AppleObjCTypeVendor(ObjCLanguageRuntime &runtime); 34 35 virtual uint32_t 36 FindTypes (const ConstString &name, 37 bool append, 38 uint32_t max_matches, 39 std::vector <ClangASTType> &types); 40 41 virtual clang::ASTContext * 42 GetClangASTContext () 43 { 44 return m_ast_ctx.getASTContext(); 45 } 46 47 friend class AppleObjCExternalASTSource; 48 private: 49 clang::ObjCInterfaceDecl *GetDeclForISA(ObjCLanguageRuntime::ObjCISA isa); 50 bool FinishDecl(clang::ObjCInterfaceDecl *decl); 51 52 ObjCLanguageRuntime &m_runtime; 53 ClangASTContext m_ast_ctx; 54 AppleObjCExternalASTSource *m_external_source; 55 56 typedef llvm::DenseMap<ObjCLanguageRuntime::ObjCISA, clang::ObjCInterfaceDecl *> ISAToInterfaceMap; 57 58 ISAToInterfaceMap m_isa_to_interface; 59 }; 60 61 } // namespace lldb_private 62 63 #endif // liblldb_AppleObjCSymbolVendor_h_ 64