summaryrefslogtreecommitdiffstats
path: root/lldb/source/Expression/ClangPersistentVariables.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2010-10-05 00:00:42 +0000
committerGreg Clayton <gclayton@apple.com>2010-10-05 00:00:42 +0000
commit1d3afba3a3625da15c03cddd88844167e11c440a (patch)
tree5dbe98282aa04515ce59c43f5bbc5e33ae584e97 /lldb/source/Expression/ClangPersistentVariables.cpp
parent668523a1b86333ff63a0e1d8da413e685fc10adc (diff)
downloadbcm5719-llvm-1d3afba3a3625da15c03cddd88844167e11c440a.tar.gz
bcm5719-llvm-1d3afba3a3625da15c03cddd88844167e11c440a.zip
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"). llvm-svn: 115578
Diffstat (limited to 'lldb/source/Expression/ClangPersistentVariables.cpp')
-rw-r--r--lldb/source/Expression/ClangPersistentVariables.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/lldb/source/Expression/ClangPersistentVariables.cpp b/lldb/source/Expression/ClangPersistentVariables.cpp
index f014811fb17..49674a9d8ae 100644
--- a/lldb/source/Expression/ClangPersistentVariables.cpp
+++ b/lldb/source/Expression/ClangPersistentVariables.cpp
@@ -33,8 +33,8 @@ ClangPersistentVariables::GetNextResultName (std::string &name)
}
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 @@ ClangPersistentVariables::CreatePersistentVariable(const char *name,
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
OpenPOWER on IntegriCloud