Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-22 Thread Zachary Turner via lldb-commits
+1. One of the points I outlined on my list was to use llvm streams. So that also solves the problem On Thu, Sep 22, 2016 at 4:54 AM Pavel Labath wrote: > On 22 September 2016 at 01:00, Greg Clayton via lldb-commits > wrote: > > If you use a StringRef in printf, please use "%*s" and then put the

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-22 Thread Pavel Labath via lldb-commits
On 22 September 2016 at 01:00, Greg Clayton via lldb-commits wrote: > If you use a StringRef in printf, please use "%*s" and then put the count and > data pointer into the printf, so the above line would become: > > + s->Printf("source regex = \"%*s\", exact_match = %d", > +(int)m_re

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Zachary Turner via lldb-commits
But the thing is, there were plenty of copies being made before. People just didn't see them. StringRef provides functions like find_first, substr, and all kinds of stuff. So before, any time someone wanted to use one of those functions, what did they do? Put it in a std::string! There's your c

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Greg Clayton via lldb-commits
> On Sep 21, 2016, at 5:14 PM, Zachary Turner wrote: > > > > On Wed, Sep 21, 2016 at 5:00 PM Greg Clayton wrote: > Please submit a change requests when doing these kinds of things and let > people comment on the changes before committing such things. > > We deleted functions that were corre

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Zachary Turner via lldb-commits
If you like I can also go through and point out all the places where I *removed* copies. On Wed, Sep 21, 2016 at 5:14 PM Zachary Turner wrote: > On Wed, Sep 21, 2016 at 5:00 PM Greg Clayton wrote: > > Please submit a change requests when doing these kinds of things and let > people comment on t

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Zachary Turner via lldb-commits
On Wed, Sep 21, 2016 at 5:00 PM Greg Clayton wrote: > Please submit a change requests when doing these kinds of things and let > people comment on the changes before committing such things. > > We deleted functions that were correctly using "const char *" like: > > bool Execute(llvm::StringRef

Re: [Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Greg Clayton via lldb-commits
Please submit a change requests when doing these kinds of things and let people comment on the changes before committing such things. We deleted functions that were correctly using "const char *" like: bool Execute(llvm::StringRef string, Match *match = nullptr) const; bool Execute(const cha

[Lldb-commits] [lldb] r282079 - Make lldb::Regex use StringRef.

2016-09-21 Thread Zachary Turner via lldb-commits
Author: zturner Date: Wed Sep 21 11:01:28 2016 New Revision: 282079 URL: http://llvm.org/viewvc/llvm-project?rev=282079&view=rev Log: Make lldb::Regex use StringRef. This updates getters and setters to use StringRef instead of const char *. I tested the build on Linux, Windows, and OSX and saw n