1 //===-- ExpressionVariable.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/Expression/ExpressionVariable.h"
11 
12 using namespace lldb_private;
13 
14 ExpressionVariable::~ExpressionVariable()
15 {
16 }
17 
18 uint8_t *
19 ExpressionVariable::GetValueBytes()
20 {
21     const size_t byte_size = m_frozen_sp->GetByteSize();
22     if (byte_size > 0)
23     {
24         if (m_frozen_sp->GetDataExtractor().GetByteSize() < byte_size)
25         {
26             m_frozen_sp->GetValue().ResizeData(byte_size);
27             m_frozen_sp->GetValue().GetData (m_frozen_sp->GetDataExtractor());
28         }
29         return const_cast<uint8_t *>(m_frozen_sp->GetDataExtractor().GetDataStart());
30     }
31     return NULL;
32 }
33 
34 PersistentExpressionState::~PersistentExpressionState ()
35 {
36 }
37