aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Commands/CommandObjectMemory.cpp
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2015-10-01 16:28:02 +0000
committerSean Callanan <scallanan@apple.com>2015-10-01 16:28:02 +0000
commitb92bd7538e167ae058eedaa948fcb3a7ceecd5af (patch)
treed34c87c3f2524f4782343e60e1216239f1b51442 /lldb/source/Commands/CommandObjectMemory.cpp
parentc8b158155c9c829da0412252ef72e823311b82aa (diff)
downloadllvm-b92bd7538e167ae058eedaa948fcb3a7ceecd5af.zip
llvm-b92bd7538e167ae058eedaa948fcb3a7ceecd5af.tar.gz
llvm-b92bd7538e167ae058eedaa948fcb3a7ceecd5af.tar.bz2
Made Target hold a map of languages to TypeSystems, and added some accessors.
Also added some target-level search functions so that persistent variables and symbols can be searched for without hand-iterating across the map of TypeSystems. llvm-svn: 249027
Diffstat (limited to 'lldb/source/Commands/CommandObjectMemory.cpp')
-rw-r--r--lldb/source/Commands/CommandObjectMemory.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectMemory.cpp b/lldb/source/Commands/CommandObjectMemory.cpp
index fb800f9..8663389 100644
--- a/lldb/source/Commands/CommandObjectMemory.cpp
+++ b/lldb/source/Commands/CommandObjectMemory.cpp
@@ -530,10 +530,14 @@ protected:
if (type_list.GetSize() == 0 && lookup_type_name.GetCString() && *lookup_type_name.GetCString() == '$')
{
- clang::TypeDecl *tdecl = llvm::cast<ClangPersistentVariables>(target->GetScratchTypeSystemForLanguage(lldb::eLanguageTypeC)->GetPersistentExpressionState())->GetPersistentType(ConstString(lookup_type_name));
- if (tdecl)
+ if (ClangPersistentVariables *persistent_vars = llvm::dyn_cast_or_null<ClangPersistentVariables>(target->GetPersistentExpressionStateForLanguage(lldb::eLanguageTypeC)))
{
- clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),(const lldb::opaque_compiler_type_t)tdecl->getTypeForDecl());
+ clang::TypeDecl *tdecl = persistent_vars->GetPersistentType(ConstString(lookup_type_name));
+
+ if (tdecl)
+ {
+ clang_ast_type.SetCompilerType(ClangASTContext::GetASTContext(&tdecl->getASTContext()),(const lldb::opaque_compiler_type_t)tdecl->getTypeForDecl());
+ }
}
}