Added a new ValueObject type that will be used to freeze dry expression
results. The clang opaque type for the expression result will be added to the
Target's ASTContext, and the bytes will be stored in a DataBuffer inside
the new object. The class is named: ValueObjectConstResult
Now after an expression is evaluated, we can get a ValueObjectSP back that
contains a ValueObjectConstResult object.
Relocated the value object dumping code into a static function within
the ValueObject class instead of being in the CommandObjectFrame.cpp file
which is what contained the code to dump variables ("frame variables").
git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@115578 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Expression/ClangPersistentVariables.cpp b/source/Expression/ClangPersistentVariables.cpp
index f014811..49674a9 100644
--- a/source/Expression/ClangPersistentVariables.cpp
+++ b/source/Expression/ClangPersistentVariables.cpp
@@ -33,8 +33,8 @@
}
bool
-ClangPersistentVariables::CreatePersistentVariable(const char *name,
- TypeFromUser user_type)
+ClangPersistentVariables::CreatePersistentVariable(const char *name,
+ TypeFromUser user_type)
{
if (GetVariable(name))
return false;
@@ -43,10 +43,11 @@
pvar.m_name = name;
pvar.m_user_type = user_type;
-
- pvar.EnableDataVars();
-
- pvar.m_data_vars->m_data = new DataBufferHeap(pvar.Size(), 0);
+ // TODO: Sean, why do we need to call this?, we can just make it below
+ // and we aren't checking the result or anything... Is this cruft left
+ // over from an old code re-org?
+ //pvar.EnableDataVars();
+ pvar.m_data_sp.reset(new DataBufferHeap(pvar.Size(), 0));
return true;
}
\ No newline at end of file