Skip to content

Commit 902f155

Browse files
committed
Change ArrayToPointerConversion ctx argument to &
1 parent b38ecfb commit 902f155

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

lldb/source/ValueObject/DILEval.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,13 @@ static CompilerType GetBasicType(lldb::TypeSystemSP type_system,
4343
}
4444

4545
static lldb::ValueObjectSP
46-
ArrayToPointerConversion(ValueObject &valobj,
47-
std::shared_ptr<ExecutionContextScope> ctx) {
46+
ArrayToPointerConversion(ValueObject &valobj, ExecutionContextScope &ctx) {
4847
uint64_t addr = valobj.GetLoadAddress();
4948
ExecutionContext exe_ctx;
50-
ctx->CalculateExecutionContext(exe_ctx);
49+
ctx.CalculateExecutionContext(exe_ctx);
5150
return ValueObject::CreateValueObjectFromAddress(
5251
"result", addr, exe_ctx,
53-
valobj.GetCompilerType().GetArrayElementType(ctx.get()).GetPointerType(),
52+
valobj.GetCompilerType().GetArrayElementType(&ctx).GetPointerType(),
5453
/* do_deref */ false);
5554
}
5655

@@ -100,7 +99,7 @@ Interpreter::UnaryConversion(lldb::ValueObjectSP valobj) {
10099
}
101100

102101
if (in_type.IsArrayType())
103-
valobj = ArrayToPointerConversion(*valobj, m_exe_ctx_scope);
102+
valobj = ArrayToPointerConversion(*valobj, *m_exe_ctx_scope);
104103

105104
if (valobj->GetCompilerType().IsInteger() ||
106105
valobj->GetCompilerType().IsUnscopedEnumerationType()) {

0 commit comments

Comments
 (0)