1 //===-- DeclVendor.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_DeclVendor_h_
11 #define liblldb_DeclVendor_h_
13 #include "lldb/Core/ClangForward.h"
14 #include "lldb/lldb-defines.h"
16 #include "clang/AST/ExternalASTMerger.h"
20 namespace lldb_private {
22 //----------------------------------------------------------------------
23 // The Decl vendor class is intended as a generic interface to search
24 // for named declarations that are not necessarily backed by a specific
26 //----------------------------------------------------------------------
29 //------------------------------------------------------------------
30 // Constructors and Destructors
31 //------------------------------------------------------------------
34 virtual ~DeclVendor() {}
36 //------------------------------------------------------------------
37 /// Look up the set of Decls that the DeclVendor currently knows about
38 /// matching a given name.
41 /// The name to look for.
44 /// If true, FindDecls will clear "decls" when it starts.
46 /// @param[in] max_matches
47 /// The maximum number of Decls to return. UINT32_MAX means "as
48 /// many as possible."
51 /// The number of Decls added to decls; will not exceed
53 //------------------------------------------------------------------
54 virtual uint32_t FindDecls(const ConstString &name, bool append,
56 std::vector<clang::NamedDecl *> &decls) = 0;
58 //------------------------------------------------------------------
59 /// Interface for ExternalASTMerger. Returns an ImporterSource
60 /// allowing type completion.
63 /// An ImporterSource for this DeclVendor.
64 //------------------------------------------------------------------
65 virtual clang::ExternalASTMerger::ImporterSource GetImporterSource() = 0;
68 //------------------------------------------------------------------
69 // For DeclVendor only
70 //------------------------------------------------------------------
71 DISALLOW_COPY_AND_ASSIGN(DeclVendor);
74 } // namespace lldb_private