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 9#include "ClangExpressionUtil.h" 10 11#include "lldb/Core/ValueObject.h" 12#include "lldb/Target/StackFrame.h" 13#include "lldb/Utility/ConstString.h" 14 15namespace lldb_private { 16namespace ClangExpressionUtil { 17lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame) { 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 28