1 //===-- SBBlock.cpp ---------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #include "lldb/API/SBBlock.h"
11 #include "lldb/Symbol/Block.h"
12 
13 using namespace lldb;
14 
15 
16 SBBlock::SBBlock () :
17     m_lldb_object_ptr (NULL)
18 {
19 }
20 
21 SBBlock::SBBlock (lldb_private::Block *lldb_object_ptr) :
22     m_lldb_object_ptr (lldb_object_ptr)
23 {
24 }
25 
26 SBBlock::~SBBlock ()
27 {
28     m_lldb_object_ptr = NULL;
29 }
30 
31 bool
32 SBBlock::IsValid () const
33 {
34     return m_lldb_object_ptr != NULL;
35 }
36 
37 void
38 SBBlock::AppendVariables (bool can_create, bool get_parent_variables, lldb_private::VariableList *var_list)
39 {
40     if (IsValid())
41     {
42         m_lldb_object_ptr->AppendVariables (can_create, get_parent_variables, var_list);
43     }
44 }
45 
46 
47 
48