[LLVM][NVPTX] Add support for griddepcontrol instruction (#123511)
[llvm-project.git] / lldb / source / Plugins / ExpressionParser / Clang / ClangExpressionUtil.cpp
blobd4b2775b8c0398f90f8757b3c2440c837c8ff93b
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 //===----------------------------------------------------------------------===//
9 #include "ClangExpressionUtil.h"
11 #include "lldb/Target/StackFrame.h"
12 #include "lldb/Utility/ConstString.h"
13 #include "lldb/ValueObject/ValueObject.h"
15 namespace lldb_private {
16 namespace ClangExpressionUtil {
17 lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame) {
18 assert(frame);
20 if (auto this_val_sp = frame->FindVariable(ConstString("this")))
21 if (this_val_sp->GetChildMemberWithName("this"))
22 return this_val_sp;
24 return nullptr;
26 } // namespace ClangExpressionUtil
27 } // namespace lldb_private