diff options
author | Jim Ingham <jingham@apple.com> | 2011-04-22 23:53:53 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2011-04-22 23:53:53 +0000 |
commit | 58b59f9522a0aafd4c2efe0781a9c88f005b7e00 (patch) | |
tree | 5e036735ce45e937a4d7f19579f0034ea2b6be00 /lldb/source/Expression/ClangExpressionDeclMap.cpp | |
parent | 0ff2b2eda3509727fdb93e2b7f45ace85c4b3767 (diff) | |
download | bcm5719-llvm-58b59f9522a0aafd4c2efe0781a9c88f005b7e00.tar.gz bcm5719-llvm-58b59f9522a0aafd4c2efe0781a9c88f005b7e00.zip |
Fix up how the ValueObjects manage their life cycle so that you can hand out a shared
pointer to a ValueObject or any of its dependent ValueObjects, and the whole cluster will
stay around as long as that shared pointer stays around.
llvm-svn: 130035
Diffstat (limited to 'lldb/source/Expression/ClangExpressionDeclMap.cpp')
-rw-r--r-- | lldb/source/Expression/ClangExpressionDeclMap.cpp | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/lldb/source/Expression/ClangExpressionDeclMap.cpp b/lldb/source/Expression/ClangExpressionDeclMap.cpp index 0054a03967b..60a37bc5949 100644 --- a/lldb/source/Expression/ClangExpressionDeclMap.cpp +++ b/lldb/source/Expression/ClangExpressionDeclMap.cpp @@ -987,13 +987,13 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable // If the reference comes from the program, then the ClangExpressionVariable's // live variable data hasn't been set up yet. Do this now. - var_sp->m_live_sp.reset(new lldb_private::ValueObjectConstResult(exe_ctx.GetBestExecutionContextScope (), - var_sp->GetTypeFromUser().GetASTContext(), - var_sp->GetTypeFromUser().GetOpaqueQualType(), - var_sp->GetName(), - mem, - eAddressTypeLoad, - pvar_byte_size)); + var_sp->m_live_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope (), + var_sp->GetTypeFromUser().GetASTContext(), + var_sp->GetTypeFromUser().GetOpaqueQualType(), + var_sp->GetName(), + mem, + eAddressTypeLoad, + pvar_byte_size); } if (!var_sp->m_live_sp) @@ -1082,13 +1082,13 @@ ClangExpressionDeclMap::DoMaterializeOnePersistentVariable // Put the location of the spare memory into the live data of the ValueObject. - var_sp->m_live_sp.reset(new lldb_private::ValueObjectConstResult(exe_ctx.GetBestExecutionContextScope(), - var_sp->GetTypeFromUser().GetASTContext(), - var_sp->GetTypeFromUser().GetOpaqueQualType(), - var_sp->GetName(), - mem, - eAddressTypeLoad, - pvar_byte_size)); + var_sp->m_live_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), + var_sp->GetTypeFromUser().GetASTContext(), + var_sp->GetTypeFromUser().GetOpaqueQualType(), + var_sp->GetName(), + mem, + eAddressTypeLoad, + pvar_byte_size); // Clear the flag if the variable will never be deallocated. @@ -1347,13 +1347,13 @@ ClangExpressionDeclMap::DoMaterializeOneVariable // Put the location of the spare memory into the live data of the ValueObject. - expr_var->m_live_sp.reset(new lldb_private::ValueObjectConstResult(exe_ctx.GetBestExecutionContextScope(), - type.GetASTContext(), - type.GetOpaqueQualType(), - name, - mem, - eAddressTypeLoad, - value_byte_size)); + expr_var->m_live_sp = ValueObjectConstResult::Create (exe_ctx.GetBestExecutionContextScope(), + type.GetASTContext(), + type.GetOpaqueQualType(), + name, + mem, + eAddressTypeLoad, + value_byte_size); // Now write the location of the area into the struct. |