aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/tools/lldb/source/Target/ABI.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/tools/lldb/source/Target/ABI.cpp')
-rw-r--r--contrib/llvm/tools/lldb/source/Target/ABI.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/contrib/llvm/tools/lldb/source/Target/ABI.cpp b/contrib/llvm/tools/lldb/source/Target/ABI.cpp
index 8809c1e51d0c..4d67cb46abe4 100644
--- a/contrib/llvm/tools/lldb/source/Target/ABI.cpp
+++ b/contrib/llvm/tools/lldb/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());