1 | //===-- ClangExpressionUtil.h -----------------------------------*- C++ -*-===// |
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 | #ifndef LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONUTIL_H |
10 | #define LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONUTIL_H |
11 | |
12 | #include "lldb/lldb-private.h" |
13 | |
14 | namespace lldb_private { |
15 | namespace ClangExpressionUtil { |
16 | /// Returns a ValueObject for the lambda class in the current frame |
17 | /// |
18 | /// To represent a lambda, Clang generates an artificial class |
19 | /// whose members are the captures and whose operator() is the |
20 | /// lambda implementation. If we capture a 'this' pointer, |
21 | /// the artifical class will contain a member variable named 'this'. |
22 | /// |
23 | /// This method returns the 'this' pointer to the artificial lambda |
24 | /// class if a real 'this' was captured. Otherwise, returns nullptr. |
25 | lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame); |
26 | |
27 | } // namespace ClangExpressionUtil |
28 | } // namespace lldb_private |
29 | |
30 | #endif // LLDB_SOURCE_PLUGINS_EXPRESSIONPARSER_CLANG_CLANGEXPRESSIONHELPER_H |
31 | |