LLDB
mainline
llvm-project
lldb
source
Plugins
ExpressionParser
Clang
ClangExpressionVariable.cpp
Go to the documentation of this file.
1
//===-- ClangExpressionVariable.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 "
ClangExpressionVariable.h
"
10
11
#include "
lldb/Core/Value.h
"
12
#include "
lldb/Core/ValueObjectConstResult.h
"
13
#include "
lldb/Target/ExecutionContext.h
"
14
#include "
lldb/Target/Process.h
"
15
#include "
lldb/Utility/ConstString.h
"
16
#include "
lldb/Utility/DataExtractor.h
"
17
#include "
lldb/Utility/Stream.h
"
18
#include "clang/AST/ASTContext.h"
19
20
using namespace
lldb_private
;
21
using namespace
clang
;
22
23
ClangExpressionVariable::ClangExpressionVariable
(
24
ExecutionContextScope
*exe_scope,
lldb::ByteOrder
byte_order,
25
uint32_t
addr_byte_size)
26
:
ExpressionVariable
(
LLVMCastKind
::eKindClang), m_parser_vars(),
27
m_jit_vars() {
28
m_flags
=
EVNone
;
29
m_frozen_sp
=
30
ValueObjectConstResult::Create
(exe_scope, byte_order, addr_byte_size);
31
}
32
33
ClangExpressionVariable::ClangExpressionVariable
(
34
ExecutionContextScope
*exe_scope,
Value
&value,
ConstString
name,
35
uint16_t
flags)
36
:
ExpressionVariable
(
LLVMCastKind
::eKindClang), m_parser_vars(),
37
m_jit_vars() {
38
m_flags
= flags;
39
m_frozen_sp
=
ValueObjectConstResult::Create
(exe_scope, value, name);
40
}
41
42
ClangExpressionVariable::ClangExpressionVariable
(
43
const
lldb::ValueObjectSP &valobj_sp)
44
:
ExpressionVariable
(
LLVMCastKind
::eKindClang), m_parser_vars(),
45
m_jit_vars() {
46
m_flags
=
EVNone
;
47
m_frozen_sp
= valobj_sp;
48
}
49
50
ClangExpressionVariable::ClangExpressionVariable
(
51
ExecutionContextScope
*exe_scope,
ConstString
name,
52
const
TypeFromUser
&user_type,
lldb::ByteOrder
byte_order,
53
uint32_t
addr_byte_size)
54
:
ExpressionVariable
(
LLVMCastKind
::eKindClang), m_parser_vars(),
55
m_jit_vars() {
56
m_flags
=
EVNone
;
57
m_frozen_sp
=
58
ValueObjectConstResult::Create
(exe_scope, byte_order, addr_byte_size);
59
SetName
(name);
60
SetCompilerType
(user_type);
61
}
62
63
TypeFromUser
ClangExpressionVariable::GetTypeFromUser
() {
64
TypeFromUser
tfu(
m_frozen_sp
->GetCompilerType());
65
return
tfu;
66
}
ClangExpressionVariable.h
ConstString.h
DataExtractor.h
ExecutionContext.h
Process.h
Stream.h
ValueObjectConstResult.h
Value.h
lldb_private::ClangExpressionVariable::ClangExpressionVariable
ClangExpressionVariable(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size)
Definition:
ClangExpressionVariable.cpp:23
lldb_private::ClangExpressionVariable::GetTypeFromUser
TypeFromUser GetTypeFromUser()
Definition:
ClangExpressionVariable.cpp:63
lldb_private::ConstString
A uniqued constant string class.
Definition:
ConstString.h:39
lldb_private::ExecutionContextScope
"lldb/Target/ExecutionContextScope.h" Inherit from this if your object can reconstruct its execution ...
Definition:
ExecutionContextScope.h:32
lldb_private::ExpressionVariable
Definition:
ExpressionVariable.h:25
lldb_private::ExpressionVariable::m_frozen_sp
lldb::ValueObjectSP m_frozen_sp
Definition:
ExpressionVariable.h:111
lldb_private::ExpressionVariable::SetName
void SetName(ConstString name)
Definition:
ExpressionVariable.h:61
lldb_private::ExpressionVariable::m_flags
FlagType m_flags
Definition:
ExpressionVariable.h:108
lldb_private::ExpressionVariable::LLVMCastKind
LLVMCastKind
Definition:
ExpressionVariable.h:28
lldb_private::ExpressionVariable::SetCompilerType
void SetCompilerType(const CompilerType &compiler_type)
Definition:
ExpressionVariable.h:57
lldb_private::ExpressionVariable::EVNone
@ EVNone
Definition:
ExpressionVariable.h:82
lldb_private::TaggedASTType< 1 >
lldb_private::ValueObjectConstResult::Create
static lldb::ValueObjectSP Create(ExecutionContextScope *exe_scope, lldb::ByteOrder byte_order, uint32_t addr_byte_size, lldb::addr_t address=LLDB_INVALID_ADDRESS)
Definition:
ValueObjectConstResult.cpp:29
lldb_private::Value
Definition:
Value.h:38
uint16_t
uint32_t
clang
Definition:
ASTResultSynthesizer.h:15
lldb_private
A class that represents a running process on the host machine.
Definition:
SBCommandInterpreterRunOptions.h:16
lldb::ByteOrder
ByteOrder
Byte ordering definitions.
Definition:
lldb-enumerations.h:139
Generated on Mon Feb 6 2023 21:14:26 for LLDB by
1.9.6