]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Symbol/DeclVendor.h
Merging ^/head r278916 through r279022.
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / 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 {
26 public:
27     //------------------------------------------------------------------
28     // Constructors and Destructors
29     //------------------------------------------------------------------
30     DeclVendor()
31     {
32     }
33     
34     virtual
35     ~DeclVendor()
36     {
37     }
38     
39     //------------------------------------------------------------------
40     /// Look up the set of Decls that the DeclVendor currently knows about
41     /// matching a given name.
42     ///
43     /// @param[in] name
44     ///     The name to look for.
45     ///
46     /// @param[in] append
47     ///     If true, FindDecls will clear "decls" when it starts.
48     ///
49     /// @param[in] max_matches
50     ///     The maximum number of Decls to return.  UINT32_MAX means "as
51     ///     many as possible."
52     ///
53     /// @return
54     ///     The number of Decls added to decls; will not exceed
55     ///     max_matches.
56     //------------------------------------------------------------------
57     virtual uint32_t
58     FindDecls (const ConstString &name,
59                bool append,
60                uint32_t max_matches,
61                std::vector <clang::NamedDecl*> &decls) = 0;
62     
63 private:
64     //------------------------------------------------------------------
65     // For DeclVendor only
66     //------------------------------------------------------------------
67     DISALLOW_COPY_AND_ASSIGN (DeclVendor);
68 };
69     
70     
71 } // namespace lldb_private
72
73 #endif