Re: [Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
On Wed, Apr 19, 2017 at 11:10 AM, Jim Inghamwrote: > We've had a couple of cases of "dead" code which turned out to be the > llvm.org side of generic behavior for which Swift was the only current > specific implementation. So while I agree, little single functions that > aren't used anywhere are fine to cull, anything that looks like it might be > the former issue should probably be discussed first. > > Jim > Ideally functions used for out-of-tree consumers should be properly unit-tested so we can at least have an alarm to distinguish. This doesn't replace a discussion of course, but it's still useful. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
This revision was automatically updated to reflect the committed changes. Closed by commit rL300729: [Utility/StringLexer] Remove dead code. (authored by davide). Changed prior to commit: https://reviews.llvm.org/D32148?vs=95519=95788#toc Repository: rL LLVM https://reviews.llvm.org/D32148 Files: lldb/trunk/include/lldb/Utility/StringLexer.h lldb/trunk/source/Utility/StringLexer.cpp Index: lldb/trunk/source/Utility/StringLexer.cpp === --- lldb/trunk/source/Utility/StringLexer.cpp +++ lldb/trunk/source/Utility/StringLexer.cpp @@ -73,10 +73,6 @@ m_position -= s; } -bool StringLexer::HasAny(Character c) { - return m_data.find(c, m_position) != std::string::npos; -} - std::string StringLexer::GetUnlexed() { return std::string(m_data, m_position); } Index: lldb/trunk/include/lldb/Utility/StringLexer.h === --- lldb/trunk/include/lldb/Utility/StringLexer.h +++ lldb/trunk/include/lldb/Utility/StringLexer.h @@ -41,8 +41,6 @@ bool HasAtLeast(Size s); - bool HasAny(Character c); - std::string GetUnlexed(); // This will assert if there are less than s characters preceding the cursor. Index: lldb/trunk/source/Utility/StringLexer.cpp === --- lldb/trunk/source/Utility/StringLexer.cpp +++ lldb/trunk/source/Utility/StringLexer.cpp @@ -73,10 +73,6 @@ m_position -= s; } -bool StringLexer::HasAny(Character c) { - return m_data.find(c, m_position) != std::string::npos; -} - std::string StringLexer::GetUnlexed() { return std::string(m_data, m_position); } Index: lldb/trunk/include/lldb/Utility/StringLexer.h === --- lldb/trunk/include/lldb/Utility/StringLexer.h +++ lldb/trunk/include/lldb/Utility/StringLexer.h @@ -41,8 +41,6 @@ bool HasAtLeast(Size s); - bool HasAny(Character c); - std::string GetUnlexed(); // This will assert if there are less than s characters preceding the cursor. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
Re: [Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
We've had a couple of cases of "dead" code which turned out to be the llvm.org side of generic behavior for which Swift was the only current specific implementation. So while I agree, little single functions that aren't used anywhere are fine to cull, anything that looks like it might be the former issue should probably be discussed first. Jim > On Apr 19, 2017, at 8:43 AM, Zachary Turner via Phabricator via lldb-commits >wrote: > > zturner accepted this revision. > zturner added a comment. > This revision is now accepted and ready to land. > > No need to request review when removing dead code. > > > https://reviews.llvm.org/D32148 > > > > ___ > lldb-commits mailing list > lldb-commits@lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
davide added a comment. Thanks! https://reviews.llvm.org/D32148 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
zturner accepted this revision. zturner added a comment. This revision is now accepted and ready to land. No need to request review when removing dead code. https://reviews.llvm.org/D32148 ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
[Lldb-commits] [PATCH] D32148: [Utility/StringLexer] Remove dead code.
davide created this revision. https://reviews.llvm.org/D32148 Files: include/lldb/Utility/StringLexer.h source/Utility/StringLexer.cpp Index: source/Utility/StringLexer.cpp === --- source/Utility/StringLexer.cpp +++ source/Utility/StringLexer.cpp @@ -73,10 +73,6 @@ m_position -= s; } -bool StringLexer::HasAny(Character c) { - return m_data.find(c, m_position) != std::string::npos; -} - std::string StringLexer::GetUnlexed() { return std::string(m_data, m_position); } Index: include/lldb/Utility/StringLexer.h === --- include/lldb/Utility/StringLexer.h +++ include/lldb/Utility/StringLexer.h @@ -41,8 +41,6 @@ bool HasAtLeast(Size s); - bool HasAny(Character c); - std::string GetUnlexed(); // This will assert if there are less than s characters preceding the cursor. Index: source/Utility/StringLexer.cpp === --- source/Utility/StringLexer.cpp +++ source/Utility/StringLexer.cpp @@ -73,10 +73,6 @@ m_position -= s; } -bool StringLexer::HasAny(Character c) { - return m_data.find(c, m_position) != std::string::npos; -} - std::string StringLexer::GetUnlexed() { return std::string(m_data, m_position); } Index: include/lldb/Utility/StringLexer.h === --- include/lldb/Utility/StringLexer.h +++ include/lldb/Utility/StringLexer.h @@ -41,8 +41,6 @@ bool HasAtLeast(Size s); - bool HasAny(Character c); - std::string GetUnlexed(); // This will assert if there are less than s characters preceding the cursor. ___ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits