LLDB
mainline
llvm-project
lldb
source
Plugins
ExpressionParser
Clang
ClangDeclVendor.cpp
Go to the documentation of this file.
1
//===-- ClangDeclVendor.cpp -----------------------------------------------===//
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
#include "
Plugins/ExpressionParser/Clang/ClangDeclVendor.h
"
10
#include "
Plugins/ExpressionParser/Clang/ClangUtil.h
"
11
#include "
Plugins/TypeSystem/Clang/TypeSystemClang.h
"
12
13
#include "
lldb/Utility/ConstString.h
"
14
15
using namespace
lldb_private
;
16
17
uint32_t
ClangDeclVendor::FindDecls
(
ConstString
name,
bool
append,
18
uint32_t max_matches,
19
std::vector<clang::NamedDecl *> &decls) {
20
if
(!append)
21
decls.clear();
22
23
std::vector<CompilerDecl> compiler_decls;
24
uint32_t ret =
FindDecls
(name,
/*append*/
false
, max_matches, compiler_decls);
25
for
(
CompilerDecl
compiler_decl : compiler_decls) {
26
clang::Decl *d =
ClangUtil::GetDecl
(compiler_decl);
27
clang::NamedDecl *nd = llvm::cast<clang::NamedDecl>(d);
28
decls.push_back(nd);
29
}
30
return
ret;
31
}
ClangDeclVendor.h
ClangUtil.h
ConstString.h
TypeSystemClang.h
lldb_private::ClangDeclVendor::FindDecls
uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches, std::vector< clang::NamedDecl * > &decls)
Definition
ClangDeclVendor.cpp:17
lldb_private::CompilerDecl
Represents a generic declaration such as a function declaration.
Definition
CompilerDecl.h:28
lldb_private::ConstString
A uniqued constant string class.
Definition
ConstString.h:40
lldb_private
A class that represents a running process on the host machine.
Definition
SBAddressRange.h:14
lldb_private::ClangUtil::GetDecl
static clang::Decl * GetDecl(const CompilerDecl &decl)
Returns the clang::Decl of the given CompilerDecl.
Definition
ClangUtil.cpp:31
Generated on
for LLDB by
1.14.0