diff options
| author | Adrian Prantl <aprantl@apple.com> | 2018-04-30 23:59:17 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2018-04-30 23:59:17 +0000 |
| commit | 03219f7f64b743cd53077280d139902b0e915365 (patch) | |
| tree | 81d48657fc2fe335eb268531b1882b61d3fee4e0 /lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | |
| parent | 5435f78046ee39f7bec4be7833cb0a86043f8aa2 (diff) | |
| download | bcm5719-llvm-03219f7f64b743cd53077280d139902b0e915365.tar.gz bcm5719-llvm-03219f7f64b743cd53077280d139902b0e915365.zip | |
Refactor GetNextPersistentVariableName into a non-virtual method
that takes a prefix string. This simplifies the implementation and
allows plugins such as the Swift plugin to supply different prefixes
for return and error variables.
rdar://problem/39299889
Differential Revision: https://reviews.llvm.org/D46088
llvm-svn: 331235
Diffstat (limited to 'lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h')
| -rw-r--r-- | lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h index a9a4a3c1a5f..1432fae711e 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h @@ -54,16 +54,11 @@ public: const CompilerType &compiler_type, lldb::ByteOrder byte_order, uint32_t addr_byte_size) override; - //---------------------------------------------------------------------- - /// Return the next entry in the sequence of strings "$0", "$1", ... for - /// use naming persistent expression convenience variables. - /// - /// @return - /// A string that contains the next persistent variable name. - //---------------------------------------------------------------------- - ConstString GetNextPersistentVariableName(Target &target) override; - void RemovePersistentVariable(lldb::ExpressionVariableSP variable) override; + llvm::StringRef + GetPersistentVariablePrefix(bool is_error) const override { + return "$"; + } void RegisterPersistentDecl(const ConstString &name, clang::NamedDecl *decl); |

