]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/lldb/Symbol/DeclVendor.h
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / include / lldb / Symbol / DeclVendor.h
1 //===-- DeclVendor.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_DeclVendor_h_
11 #define liblldb_DeclVendor_h_
12
13 #include "lldb/Core/ClangForward.h"
14
15 #include <vector>
16
17 namespace lldb_private {
18
19 //----------------------------------------------------------------------
20 // The Decl vendor class is intended as a generic interface to search
21 // for named declarations that are not necessarily backed by a specific
22 // symbol file.
23 //----------------------------------------------------------------------
24 class DeclVendor {
25 public:
26   //------------------------------------------------------------------
27   // Constructors and Destructors
28   //------------------------------------------------------------------
29   DeclVendor() {}
30
31   virtual ~DeclVendor() {}
32
33   //------------------------------------------------------------------
34   /// Look up the set of Decls that the DeclVendor currently knows about
35   /// matching a given name.
36   ///
37   /// @param[in] name
38   ///     The name to look for.
39   ///
40   /// @param[in] append
41   ///     If true, FindDecls will clear "decls" when it starts.
42   ///
43   /// @param[in] max_matches
44   ///     The maximum number of Decls to return.  UINT32_MAX means "as
45   ///     many as possible."
46   ///
47   /// @return
48   ///     The number of Decls added to decls; will not exceed
49   ///     max_matches.
50   //------------------------------------------------------------------
51   virtual uint32_t FindDecls(const ConstString &name, bool append,
52                              uint32_t max_matches,
53                              std::vector<clang::NamedDecl *> &decls) = 0;
54
55 private:
56   //------------------------------------------------------------------
57   // For DeclVendor only
58   //------------------------------------------------------------------
59   DISALLOW_COPY_AND_ASSIGN(DeclVendor);
60 };
61
62 } // namespace lldb_private
63
64 #endif