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