LLDB mainline
CompilerDecl.cpp
Go to the documentation of this file.
1//===-- CompilerDecl.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 "lldb/Utility/Scalar.h"
13
14using namespace lldb_private;
15
17 return m_type_system->DeclGetName(m_opaque_decl);
18}
19
21 return m_type_system->DeclGetMangledName(m_opaque_decl);
22}
23
27
29 return m_type_system->GetTypeForDecl(m_opaque_decl);
30}
31
33 return m_type_system->DeclGetFunctionReturnType(m_opaque_decl);
34}
35
37 return m_type_system->DeclGetFunctionNumArguments(m_opaque_decl);
38}
39
41 return m_type_system->DeclGetFunctionArgumentType(m_opaque_decl, arg_idx);
42}
43
45 const lldb_private::CompilerDecl &rhs) {
46 return lhs.GetTypeSystem() == rhs.GetTypeSystem() &&
47 lhs.GetOpaqueDecl() == rhs.GetOpaqueDecl();
48}
49
51 const lldb_private::CompilerDecl &rhs) {
52 return lhs.GetTypeSystem() != rhs.GetTypeSystem() ||
53 lhs.GetOpaqueDecl() != rhs.GetOpaqueDecl();
54}
55
56std::vector<lldb_private::CompilerContext>
58 return m_type_system->DeclGetCompilerContext(m_opaque_decl);
59}
60
62 return m_type_system->DeclGetConstantValue(m_opaque_decl);
63}
Represents a generic declaration context in a program.
Represents a generic declaration such as a function declaration.
void * GetOpaqueDecl() const
ConstString GetMangledName() const
CompilerType GetFunctionArgumentType(size_t arg_idx) const
CompilerType GetFunctionReturnType() const
CompilerDeclContext GetDeclContext() const
size_t GetNumFunctionArguments() const
CompilerType GetType() const
ConstString GetName() const
TypeSystem * GetTypeSystem() const
Scalar GetConstantValue() const
std::vector< lldb_private::CompilerContext > GetCompilerContext() const
Populate a valid compiler context from the current declaration.
Generic representation of a type in a programming language.
A uniqued constant string class.
Definition ConstString.h:40
A class that represents a running process on the host machine.
bool operator!=(const Address &lhs, const Address &rhs)
Definition Address.cpp:1017
bool operator==(const Address &lhs, const Address &rhs)
Definition Address.cpp:1011