LLDB mainline
CompilerDeclContext.cpp
Go to the documentation of this file.
1//===-- CompilerDeclContext.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
12#include <vector>
13
14using namespace lldb_private;
15
16std::vector<CompilerDecl>
18 const bool ignore_using_decls) {
19 if (IsValid())
21 ignore_using_decls);
22 return std::vector<CompilerDecl>();
23}
24
26 if (IsValid())
28 return ConstString();
29}
30
32 if (IsValid())
34 return ConstString();
35}
36
38 if (IsValid())
40 return false;
41}
42
44 if (IsValid())
46 return {};
47}
48
50 if (!IsValid())
51 return false;
52
53 // If the other context is just the current context, we don't need to go
54 // over the type system to know that the lookup is identical.
55 if (this == &other)
56 return true;
57
59 other.m_opaque_decl_ctx);
60}
61
62std::vector<lldb_private::CompilerContext>
64 if (IsValid())
66 return {};
67}
68
71 return lhs.GetTypeSystem() == rhs.GetTypeSystem() &&
73}
74
77 return lhs.GetTypeSystem() != rhs.GetTypeSystem() ||
79}
Represents a generic declaration context in a program.
std::vector< CompilerDecl > FindDeclByName(ConstString name, const bool ignore_using_decls)
bool IsClassMethod()
Checks if this decl context represents a method of a class.
bool IsContainedInLookup(CompilerDeclContext other) const
Check if the given other decl context is contained in the lookup of this decl context (for example be...
lldb::LanguageType GetLanguage()
Determines the original language of the decl context.
std::vector< lldb_private::CompilerContext > GetCompilerContext() const
Populate a valid compiler context from the current decl context.
A uniqued constant string class.
Definition: ConstString.h:40
virtual std::vector< CompilerDecl > DeclContextFindDeclByName(void *opaque_decl_ctx, ConstString name, const bool ignore_imported_decls)
Definition: TypeSystem.cpp:190
virtual bool DeclContextIsClassMethod(void *opaque_decl_ctx)=0
virtual bool DeclContextIsContainedInLookup(void *opaque_decl_ctx, void *other_opaque_decl_ctx)=0
virtual std::vector< lldb_private::CompilerContext > DeclContextGetCompilerContext(void *opaque_decl_ctx)
Definition: TypeSystem.cpp:185
virtual lldb::LanguageType DeclContextGetLanguage(void *opaque_decl_ctx)=0
virtual ConstString DeclContextGetName(void *opaque_decl_ctx)=0
virtual ConstString DeclContextGetScopeQualifiedName(void *opaque_decl_ctx)=0
A class that represents a running process on the host machine.
bool operator!=(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1029
bool operator==(const Address &lhs, const Address &rhs)
Definition: Address.cpp:1023
LanguageType
Programming language type.