LLDB  mainline
ClangDeclVendor.h
Go to the documentation of this file.
1 //===-- ClangDeclVendor.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_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGDECLVENDOR_H
10 #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGDECLVENDOR_H
11 
12 #include "lldb/Symbol/DeclVendor.h"
13 
14 namespace clang {
15 class NamedDecl;
16 }
17 
18 namespace lldb_private {
19 
20 // A clang specialized extension to DeclVendor.
21 class ClangDeclVendor : public DeclVendor {
22 public:
24 
25  virtual ~ClangDeclVendor() = default;
26 
28 
29  uint32_t FindDecls(ConstString name, bool append, uint32_t max_matches,
30  std::vector<clang::NamedDecl *> &decls);
31 
32  static bool classof(const DeclVendor *vendor) {
33  return vendor->GetKind() >= eClangDeclVendor &&
34  vendor->GetKind() < eLastClangDeclVendor;
35  }
36 
37 private:
38  ClangDeclVendor(const ClangDeclVendor &) = delete;
39  const ClangDeclVendor &operator=(const ClangDeclVendor &) = delete;
40 };
41 } // namespace lldb_private
42 
43 #endif
lldb_private::ClangDeclVendor
Definition: ClangDeclVendor.h:21
lldb_private::ClangDeclVendor::operator=
const ClangDeclVendor & operator=(const ClangDeclVendor &)=delete
DeclVendor.h
lldb_private::ClangDeclVendor::classof
static bool classof(const DeclVendor *vendor)
Definition: ClangDeclVendor.h:32
lldb_private::DeclVendor::eClangDeclVendor
@ eClangDeclVendor
Definition: DeclVendor.h:23
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::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::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.
clang
Definition: ASTResultSynthesizer.h:15
lldb_private
A class that represents a running process on the host machine.
Definition: SBCommandInterpreterRunOptions.h:16
lldb_private::ClangDeclVendor::~ClangDeclVendor
virtual ~ClangDeclVendor()=default
lldb_private::ClangDeclVendor::ClangDeclVendor
ClangDeclVendor(DeclVendorKind kind)
Definition: ClangDeclVendor.h:23