1*fcaf7f86SDimitry Andric //===-- ClangExpressionUtil.h -----------------------------------*- C++ -*-===// 2*fcaf7f86SDimitry Andric // 3*fcaf7f86SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*fcaf7f86SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 5*fcaf7f86SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*fcaf7f86SDimitry Andric // 7*fcaf7f86SDimitry Andric //===----------------------------------------------------------------------===// 8*fcaf7f86SDimitry Andric 9*fcaf7f86SDimitry Andric #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONUTIL_H 10*fcaf7f86SDimitry Andric #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONUTIL_H 11*fcaf7f86SDimitry Andric 12*fcaf7f86SDimitry Andric #include "lldb/lldb-private.h" 13*fcaf7f86SDimitry Andric 14*fcaf7f86SDimitry Andric namespace lldb_private { 15*fcaf7f86SDimitry Andric namespace ClangExpressionUtil { 16*fcaf7f86SDimitry Andric /// Returns a ValueObject for the lambda class in the current frame 17*fcaf7f86SDimitry Andric /// 18*fcaf7f86SDimitry Andric /// To represent a lambda, Clang generates an artificial class 19*fcaf7f86SDimitry Andric /// whose members are the captures and whose operator() is the 20*fcaf7f86SDimitry Andric /// lambda implementation. If we capture a 'this' pointer, 21*fcaf7f86SDimitry Andric /// the artifical class will contain a member variable named 'this'. 22*fcaf7f86SDimitry Andric /// 23*fcaf7f86SDimitry Andric /// This method returns the 'this' pointer to the artificial lambda 24*fcaf7f86SDimitry Andric /// class if a real 'this' was captured. Otherwise, returns nullptr. 25*fcaf7f86SDimitry Andric lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame); 26*fcaf7f86SDimitry Andric 27*fcaf7f86SDimitry Andric } // namespace ClangExpressionUtil 28*fcaf7f86SDimitry Andric } // namespace lldb_private 29*fcaf7f86SDimitry Andric 30*fcaf7f86SDimitry Andric #endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H 31