blob: 8bef60fdf1d7b1164f4566b5244efc7bd9e03e06 [file] [log] [blame]
Sean Callanane33724f2015-09-03 00:35:46 +00001//===-- 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
Sean Callananbc8ac342015-09-04 20:49:51 +000012using namespace lldb_private;
13
14ExpressionVariable::~ExpressionVariable()
15{
16}
17
18uint8_t *
19ExpressionVariable::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}
Sean Callanan8f1f9a12015-09-30 19:57:57 +000033
34PersistentExpressionState::~PersistentExpressionState ()
35{
36}