diff options
| author | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 04:36:54 +0000 |
|---|---|---|
| committer | Bruce Mitchener <bruce.mitchener@gmail.com> | 2015-09-01 04:36:54 +0000 |
| commit | ee188ba20e3ff8eac8df9217ceb7aa93a51858b0 (patch) | |
| tree | c4eecda34a9be36c0ce93cadae1bfe563c5cc659 | |
| parent | 520aaa2f7d898f0619f02d2f4652e720df5fdd2c (diff) | |
| download | bcm5719-llvm-ee188ba20e3ff8eac8df9217ceb7aa93a51858b0.tar.gz bcm5719-llvm-ee188ba20e3ff8eac8df9217ceb7aa93a51858b0.zip | |
[lldb-mi] Use find, not find_first_of, for "--".
Summary:
find_first_of will look for any of the characters, not the full
string passed in. When looking for "--" then, we must use find
and not find_first_of.
Reviewers: ki.stfu, abidh
Subscribers: lldb-commits
Differential Revision: http://reviews.llvm.org/D12517
llvm-svn: 246529
| -rw-r--r-- | lldb/tools/lldb-mi/MICmdArgValFile.cpp | 2 | ||||
| -rw-r--r-- | lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lldb/tools/lldb-mi/MICmdArgValFile.cpp b/lldb/tools/lldb-mi/MICmdArgValFile.cpp index e97b7f4c08e..9e59dec1d02 100644 --- a/lldb/tools/lldb-mi/MICmdArgValFile.cpp +++ b/lldb/tools/lldb-mi/MICmdArgValFile.cpp @@ -146,7 +146,7 @@ CMICmdArgValFile::IsFilePath(const CMIUtilString &vrFileNamePath) const const bool bHaveBckSlash = (vrFileNamePath.find_first_of("\\") != std::string::npos); // Look for --someLongOption - size_t nPos = vrFileNamePath.find_first_of("--"); + size_t nPos = vrFileNamePath.find("--"); const bool bLong = (nPos == 0); if (bLong) return false; diff --git a/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp b/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp index 5d7e431b1ea..fef180e04b9 100644 --- a/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp +++ b/lldb/tools/lldb-mi/MICmdArgValOptionLong.cpp @@ -254,7 +254,7 @@ CMICmdArgValOptionLong::IsArgLongOption(const CMIUtilString &vrTxt) const if (bHavePosSlash || bHaveBckSlash) return false; - const size_t nPos = vrTxt.find_first_of("--"); + const size_t nPos = vrTxt.find("--"); if (nPos != 0) return false; |

