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