diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:53:01 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2019-10-23 17:53:01 +0000 |
commit | ead246455adf1a215ec2715dad6533073a6beb4e (patch) | |
tree | f3f97a47d77053bf96fe74cdbd6fae74380e8a92 /source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | |
parent | fdb00c4408990a0a63ef7f496d809ce59f263bc5 (diff) | |
download | src-ead246455adf1a215ec2715dad6533073a6beb4e.tar.gz src-ead246455adf1a215ec2715dad6533073a6beb4e.zip |
Vendor import of stripped lldb trunk r375505, the last commit before thevendor/lldb/lldb-trunk-r375505vendor/lldb
upstream Subversion repository was made read-only, and the LLVM project
migrated to GitHub:
https://llvm.org/svn/llvm-project/lldb/trunk@375505
Notes
Notes:
svn path=/vendor/lldb/dist/; revision=353952
svn path=/vendor/lldb/lldb-r375505/; revision=353953; tag=vendor/lldb/lldb-trunk-r375505
Diffstat (limited to 'source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h')
-rw-r--r-- | source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h b/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h index b39f89ad7eef..95e6c3ac963d 100644 --- a/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h +++ b/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h @@ -45,11 +45,20 @@ public: uint32_t addr_byte_size) override; void RemovePersistentVariable(lldb::ExpressionVariableSP variable) override; - llvm::StringRef - GetPersistentVariablePrefix(bool is_error) const override { + + llvm::StringRef GetPersistentVariablePrefix(bool is_error) const override { return "$"; } + /// Returns the next file name that should be used for user expressions. + std::string GetNextExprFileName() { + std::string name; + name.append("<user expression "); + name.append(std::to_string(m_next_user_file_id++)); + name.append(">"); + return name; + } + llvm::Optional<CompilerType> GetCompilerTypeFromPersistentDecl(ConstString type_name) override; @@ -66,8 +75,10 @@ public: } private: - uint32_t m_next_persistent_variable_id; ///< The counter used by - ///GetNextResultName(). + /// The counter used by GetNextExprFileName. + uint32_t m_next_user_file_id = 0; + // The counter used by GetNextPersistentVariableName + uint32_t m_next_persistent_variable_id = 0; typedef llvm::DenseMap<const char *, clang::NamedDecl *> PersistentDeclMap; PersistentDeclMap |