LLDB mainline
ClangExpressionUtil.cpp
Go to the documentation of this file.
1//===-- ClangExpressionUtil.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
10
14
15namespace lldb_private {
16namespace ClangExpressionUtil {
18 assert(frame);
19
20 if (auto this_val_sp = frame->FindVariable(ConstString("this")))
21 if (this_val_sp->GetChildMemberWithName("this"))
22 return this_val_sp;
23
24 return nullptr;
25}
26} // namespace ClangExpressionUtil
27} // namespace lldb_private
A uniqued constant string class.
Definition: ConstString.h:40
This base class provides an interface to stack frames.
Definition: StackFrame.h:44
lldb::ValueObjectSP FindVariable(ConstString name)
Attempt to reconstruct the ValueObject for a variable with a given name from within the current Stack...
lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame)
Returns a ValueObject for the lambda class in the current frame.
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::ValueObject > ValueObjectSP
Definition: lldb-forward.h:484