Coverage Report

Created: 2023-09-21 18:56

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionUtil.cpp
Line
Count
Source
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
//===----------------------------------------------------------------------===//
8
9
#include "ClangExpressionUtil.h"
10
11
#include "lldb/Core/ValueObject.h"
12
#include "lldb/Target/StackFrame.h"
13
#include "lldb/Utility/ConstString.h"
14
15
namespace lldb_private {
16
namespace ClangExpressionUtil {
17
2.72k
lldb::ValueObjectSP GetLambdaValueObject(StackFrame *frame) {
18
2.72k
  assert(frame);
19
20
2.72k
  if (auto this_val_sp = frame->FindVariable(ConstString("this")))
21
246
    if (this_val_sp->GetChildMemberWithName("this"))
22
154
      return this_val_sp;
23
24
2.57k
  return nullptr;
25
2.72k
}
26
} // namespace ClangExpressionUtil
27
} // namespace lldb_private