diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-30 11:55:28 +0000 |
commit | e81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch) | |
tree | 9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Expression/ExpressionVariable.cpp | |
parent | 85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff) |
Notes
Diffstat (limited to 'source/Expression/ExpressionVariable.cpp')
-rw-r--r-- | source/Expression/ExpressionVariable.cpp | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/source/Expression/ExpressionVariable.cpp b/source/Expression/ExpressionVariable.cpp new file mode 100644 index 000000000000..8bef60fdf1d7 --- /dev/null +++ b/source/Expression/ExpressionVariable.cpp @@ -0,0 +1,36 @@ +//===-- ExpressionVariable.cpp ----------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "lldb/Expression/ExpressionVariable.h" + +using namespace lldb_private; + +ExpressionVariable::~ExpressionVariable() +{ +} + +uint8_t * +ExpressionVariable::GetValueBytes() +{ + const size_t byte_size = m_frozen_sp->GetByteSize(); + if (byte_size > 0) + { + if (m_frozen_sp->GetDataExtractor().GetByteSize() < byte_size) + { + m_frozen_sp->GetValue().ResizeData(byte_size); + m_frozen_sp->GetValue().GetData (m_frozen_sp->GetDataExtractor()); + } + return const_cast<uint8_t *>(m_frozen_sp->GetDataExtractor().GetDataStart()); + } + return NULL; +} + +PersistentExpressionState::~PersistentExpressionState () +{ +} |