summaryrefslogtreecommitdiff
path: root/source/Target/ABI.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-12-30 11:55:28 +0000
commite81d9d49145e432d917eea3a70d2ae74dcad1d89 (patch)
tree9ed5e1a91f242e2cb5911577356e487a55c01b78 /source/Target/ABI.cpp
parent85d8ef8f1f0e0e063a8571944302be2d2026f823 (diff)
Notes
Diffstat (limited to 'source/Target/ABI.cpp')
-rw-r--r--source/Target/ABI.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/source/Target/ABI.cpp b/source/Target/ABI.cpp
index 8809c1e51d0c..4d67cb46abe4 100644
--- a/source/Target/ABI.cpp
+++ b/source/Target/ABI.cpp
@@ -11,8 +11,9 @@
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/ValueObjectConstResult.h"
-#include "lldb/Expression/ClangPersistentVariables.h"
-#include "lldb/Symbol/ClangASTType.h"
+#include "Plugins/ExpressionParser/Clang/ClangPersistentVariables.h"
+#include "lldb/Symbol/CompilerType.h"
+#include "lldb/Symbol/TypeSystem.h"
#include "lldb/Target/Target.h"
#include "lldb/Target/Thread.h"
@@ -84,7 +85,7 @@ ABI::GetRegisterInfoByName (const ConstString &name, RegisterInfo &info)
bool
ABI::GetRegisterInfoByKind (RegisterKind reg_kind, uint32_t reg_num, RegisterInfo &info)
{
- if (reg_kind < eRegisterKindGCC || reg_kind >= kNumRegisterKinds)
+ if (reg_kind < eRegisterKindEHFrame || reg_kind >= kNumRegisterKinds)
return false;
uint32_t count = 0;
@@ -105,7 +106,7 @@ ABI::GetRegisterInfoByKind (RegisterKind reg_kind, uint32_t reg_num, RegisterInf
ValueObjectSP
ABI::GetReturnValueObject (Thread &thread,
- ClangASTType &ast_type,
+ CompilerType &ast_type,
bool persistent) const
{
if (!ast_type.IsValid())
@@ -123,8 +124,12 @@ ABI::GetReturnValueObject (Thread &thread,
if (persistent)
{
- ClangPersistentVariables& persistent_variables = thread.CalculateTarget()->GetPersistentVariables();
- ConstString persistent_variable_name (persistent_variables.GetNextPersistentVariableName());
+ PersistentExpressionState *persistent_expression_state = thread.CalculateTarget()->GetPersistentExpressionStateForLanguage(ast_type.GetMinimumLanguage());
+
+ if (!persistent_expression_state)
+ return ValueObjectSP();
+
+ ConstString persistent_variable_name (persistent_expression_state->GetNextPersistentVariableName());
lldb::ValueObjectSP const_valobj_sp;
@@ -141,7 +146,7 @@ ABI::GetReturnValueObject (Thread &thread,
return_valobj_sp = const_valobj_sp;
- ClangExpressionVariableSP clang_expr_variable_sp(persistent_variables.CreatePersistentVariable(return_valobj_sp));
+ ExpressionVariableSP clang_expr_variable_sp(persistent_expression_state->CreatePersistentVariable(return_valobj_sp));
assert (clang_expr_variable_sp.get());