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