[Lldb-commits] [lldb] r368243 - [Utility] Remove unused function 'GetMatchSpanningIndices'
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Wed Aug 7 18:44:03 PDT 2019
Author: jdevlieghere
Date: Wed Aug 7 18:44:03 2019
New Revision: 368243
URL: http://llvm.org/viewvc/llvm-project?rev=368243&view=rev
Log:
[Utility] Remove unused function 'GetMatchSpanningIndices'
Modified:
lldb/trunk/include/lldb/Utility/RegularExpression.h
lldb/trunk/source/Utility/RegularExpression.cpp
Modified: lldb/trunk/include/lldb/Utility/RegularExpression.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/RegularExpression.h?rev=368243&r1=368242&r2=368243&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Utility/RegularExpression.h (original)
+++ lldb/trunk/include/lldb/Utility/RegularExpression.h Wed Aug 7 18:44:03 2019
@@ -83,10 +83,6 @@ public:
bool GetMatchAtIndex(llvm::StringRef s, uint32_t idx,
llvm::StringRef &match_str) const;
- bool GetMatchSpanningIndices(llvm::StringRef s, uint32_t idx1,
- uint32_t idx2,
- llvm::StringRef &match_str) const;
-
protected:
std::vector<regmatch_t>
m_matches; ///< Where parenthesized subexpressions results are stored
Modified: lldb/trunk/source/Utility/RegularExpression.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/RegularExpression.cpp?rev=368243&r1=368242&r2=368243&view=diff
==============================================================================
--- lldb/trunk/source/Utility/RegularExpression.cpp (original)
+++ lldb/trunk/source/Utility/RegularExpression.cpp Wed Aug 7 18:44:03 2019
@@ -126,23 +126,6 @@ bool RegularExpression::Match::GetMatchA
return false;
}
-bool RegularExpression::Match::GetMatchSpanningIndices(
- llvm::StringRef s, uint32_t idx1, uint32_t idx2,
- llvm::StringRef &match_str) const {
- if (idx1 < m_matches.size() && idx2 < m_matches.size()) {
- if (m_matches[idx1].rm_so == m_matches[idx2].rm_eo) {
- // Matched the empty string...
- match_str = llvm::StringRef();
- return true;
- } else if (m_matches[idx1].rm_so < m_matches[idx2].rm_eo) {
- match_str = s.substr(m_matches[idx1].rm_so,
- m_matches[idx2].rm_eo - m_matches[idx1].rm_so);
- return true;
- }
- }
- return false;
-}
-
// Returns true if the regular expression compiled and is ready for execution.
bool RegularExpression::IsValid() const { return m_comp_err == 0; }
More information about the lldb-commits
mailing list