diff options
| author | Adrian Prantl <aprantl@apple.com> | 2018-04-30 23:59:15 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2018-04-30 23:59:15 +0000 |
| commit | 5435f78046ee39f7bec4be7833cb0a86043f8aa2 (patch) | |
| tree | df2c9233d60e383508bad100b33fabb427ed43c8 /lldb/source/Target/ABI.cpp | |
| parent | 763cd2a98a61083593cd8f167bf6d27aa7eb6d96 (diff) | |
| download | bcm5719-llvm-5435f78046ee39f7bec4be7833cb0a86043f8aa2.tar.gz bcm5719-llvm-5435f78046ee39f7bec4be7833cb0a86043f8aa2.zip | |
Move the persistent variable counter into Target
so it can be shared across multiple language plugins.
In a multi-language project it is counterintuitive to have a result
variables reuse numbers just because they are using a different
language plugin in LLDB (but not for example, when they are
Objective-C versus C++, since they are both handled by Clang).
This is NFC on llvm.org except for the Go plugin.
rdar://problem/39299889
Differential Revision: https://reviews.llvm.org/D46083
llvm-svn: 331234
Diffstat (limited to 'lldb/source/Target/ABI.cpp')
| -rw-r--r-- | lldb/source/Target/ABI.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Target/ABI.cpp b/lldb/source/Target/ABI.cpp index ecf7aed858e..843216916f5 100644 --- a/lldb/source/Target/ABI.cpp +++ b/lldb/source/Target/ABI.cpp @@ -102,15 +102,16 @@ ValueObjectSP ABI::GetReturnValueObject(Thread &thread, CompilerType &ast_type, // work. if (persistent) { + Target &target = *thread.CalculateTarget(); PersistentExpressionState *persistent_expression_state = - thread.CalculateTarget()->GetPersistentExpressionStateForLanguage( + target.GetPersistentExpressionStateForLanguage( ast_type.GetMinimumLanguage()); if (!persistent_expression_state) return ValueObjectSP(); ConstString persistent_variable_name( - persistent_expression_state->GetNextPersistentVariableName()); + persistent_expression_state->GetNextPersistentVariableName(target)); lldb::ValueObjectSP const_valobj_sp; |

