LLDB
mainline
llvm-project
lldb
include
lldb
Symbol
DeclVendor.h
Go to the documentation of this file.
1
//===-- DeclVendor.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 LLDB_SYMBOL_DECLVENDOR_H
10
#define LLDB_SYMBOL_DECLVENDOR_H
11
12
#include "
lldb/lldb-defines.h
"
13
14
#include <vector>
15
16
namespace
lldb_private
{
17
18
// The Decl vendor class is intended as a generic interface to search for named
19
// declarations that are not necessarily backed by a specific symbol file.
20
class
DeclVendor
{
21
public
:
22
enum
DeclVendorKind
{
23
eClangDeclVendor
,
24
eClangModuleDeclVendor
,
25
eAppleObjCDeclVendor
,
26
eLastClangDeclVendor
,
27
};
28
// Constructors and Destructors
29
DeclVendor
(
DeclVendorKind
kind) :
m_kind
(kind) {}
30
31
virtual
~DeclVendor
() =
default
;
32
33
DeclVendorKind
GetKind
()
const
{
return
m_kind
; }
34
35
/// Look up the set of Decls that the DeclVendor currently knows about
36
/// matching a given name.
37
///
38
/// \param[in] name
39
/// The name to look for.
40
///
41
/// \param[in] append
42
/// If true, FindDecls will clear "decls" when it starts.
43
///
44
/// \param[in] max_matches
45
/// The maximum number of Decls to return. UINT32_MAX means "as
46
/// many as possible."
47
///
48
/// \return
49
/// The number of Decls added to decls; will not exceed
50
/// max_matches.
51
virtual
uint32_t
FindDecls
(
ConstString
name,
bool
append,
52
uint32_t
max_matches,
53
std::vector<CompilerDecl> &decls) = 0;
54
55
/// Look up the types that the DeclVendor currently knows about matching a
56
/// given name.
57
///
58
/// \param[in] name
59
/// The name to look for.
60
///
61
/// \param[in] max_matches
62
// The maximum number of matches. UINT32_MAX means "as many as possible".
63
///
64
/// \return
65
/// The vector of CompilerTypes that was found.
66
std::vector<CompilerType>
FindTypes
(
ConstString
name,
uint32_t
max_matches);
67
68
private
:
69
// For DeclVendor only
70
DeclVendor
(
const
DeclVendor
&) =
delete
;
71
const
DeclVendor
&
operator=
(
const
DeclVendor
&) =
delete
;
72
73
const
DeclVendorKind
m_kind
;
74
};
75
76
}
// namespace lldb_private
77
78
#endif
lldb_private::DeclVendor::m_kind
const DeclVendorKind m_kind
Definition:
DeclVendor.h:73
lldb_private::DeclVendor::FindTypes
std::vector< CompilerType > FindTypes(ConstString name, uint32_t max_matches)
Look up the types that the DeclVendor currently knows about matching a given name.
Definition:
DeclVendor.cpp:18
lldb-defines.h
lldb_private::DeclVendor::~DeclVendor
virtual ~DeclVendor()=default
lldb_private::DeclVendor::eClangDeclVendor
@ eClangDeclVendor
Definition:
DeclVendor.h:23
lldb_private::DeclVendor::eClangModuleDeclVendor
@ eClangModuleDeclVendor
Definition:
DeclVendor.h:24
lldb_private::DeclVendor::GetKind
DeclVendorKind GetKind() const
Definition:
DeclVendor.h:33
lldb_private::ConstString
Definition:
ConstString.h:40
lldb_private::DeclVendor::DeclVendorKind
DeclVendorKind
Definition:
DeclVendor.h:22
lldb_private::DeclVendor::operator=
const DeclVendor & operator=(const DeclVendor &)=delete
lldb_private::DeclVendor::eLastClangDeclVendor
@ eLastClangDeclVendor
Definition:
DeclVendor.h:26
uint32_t
lldb_private::DeclVendor
Definition:
DeclVendor.h:20
lldb_private::DeclVendor::FindDecls
virtual uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector< CompilerDecl > &decls)=0
Look up the set of Decls that the DeclVendor currently knows about matching a given name.
lldb_private::DeclVendor::eAppleObjCDeclVendor
@ eAppleObjCDeclVendor
Definition:
DeclVendor.h:25
lldb_private
A class that represents a running process on the host machine.
Definition:
SBCommandInterpreterRunOptions.h:16
lldb_private::DeclVendor::DeclVendor
DeclVendor(DeclVendorKind kind)
Definition:
DeclVendor.h:29
Generated on Sun Jul 3 2022 05:35:44 for LLDB by
1.8.17