| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
| |
llvm-svn: 287409
|
|
|
|
| |
llvm-svn: 287401
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was a bit tricky, especially for things like
OptionValueArray and OptionValueDictionary since they do some
funky string parsing. Rather than try to re-write line-by-line
I tried to make the StringRef usage idiomatic, even though
it meant often re-writing from scratch large blocks of code
in a different way while keeping true to the original intent.
The finished code is a big improvement though, and often much
shorter than the original code. All tests and unit tests
pass on Windows and Linux.
llvm-svn: 287242
|
|
|
|
| |
llvm-svn: 287208
|
|
|
|
| |
llvm-svn: 287190
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D26721
llvm-svn: 287188
|
|
|
|
| |
llvm-svn: 287157
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a large API change that removes the two functions from
StreamString that return a std::string& and a const std::string&,
and instead provide one function which returns a StringRef.
Direct access to the underlying buffer violates the concept of
a "stream" which is intended to provide forward only access,
and makes porting to llvm::raw_ostream more difficult in the
future.
Differential Revision: https://reviews.llvm.org/D26698
llvm-svn: 287152
|
|
|
|
| |
llvm-svn: 287055
|
|
|
|
| |
llvm-svn: 286916
|
|
|
|
| |
llvm-svn: 286915
|
|
|
|
| |
llvm-svn: 286906
|
|
|
|
| |
llvm-svn: 286747
|
|
|
|
| |
llvm-svn: 286743
|
|
|
|
| |
llvm-svn: 286742
|
|
|
|
| |
llvm-svn: 286740
|
|
|
|
| |
llvm-svn: 286731
|
|
|
|
| |
llvm-svn: 286728
|
|
|
|
| |
llvm-svn: 286723
|
|
|
|
|
|
|
|
| |
This would trigger an assertion at runtime otherwise.
Differential Revision: https://reviews.llvm.org/D26482
llvm-svn: 286562
|
|
|
|
|
|
|
|
|
| |
This is forcing to use Error::success(), which is in a wide majority
of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
llvm-svn: 286561
|
|
|
|
| |
llvm-svn: 286369
|
|
|
|
| |
llvm-svn: 286303
|
|
|
|
| |
llvm-svn: 286208
|
|
|
|
|
|
|
|
|
|
| |
This makes the logic easier to follow and also propagates
StringRef up to the API boundary, which is necessary for
making higher up StringRef API changes.
Differential Revision: https://reviews.llvm.org/D26325
llvm-svn: 286204
|
|
|
|
|
|
|
|
|
|
| |
Reviewers: zturner, labath
Subscribers: tberghammer, danalbert, lldb-commits
Differential Revision: https://reviews.llvm.org/D26233
llvm-svn: 285855
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
The only usage there was in GetModificationTime(). I also took the opportunity
to move this function from FileSpec to the FileSystem class - since we are
using FileSpecs to also represent remote files for which we cannot (easily)
retrieve modification time, it makes sense to make the decision to get the
modification time more explicit.
The new function returns a llvm::sys::TimePoint<>. To aid the transition
from TimeValue, I have added a constructor to it which enables implicit
conversion from a time_point.
Reviewers: zturner, clayborg
Subscribers: mehdi_amini, tberghammer, danalbert, beanz, mgorny, lldb-commits
Differential Revision: https://reviews.llvm.org/D25392
llvm-svn: 285702
|
|
|
|
|
|
|
|
|
|
| |
never used
StringRef is passed through all of these APIs but never actually
used. Just remove it from the API for now and if people want to use it
they can add it back.
llvm-svn: 284362
|
|
|
|
| |
llvm-svn: 283603
|
|
|
|
| |
llvm-svn: 283494
|
|
|
|
|
|
|
|
|
|
| |
assert.
Added a check for empty at the point where we were going to crash.
<rdar://problem/28654032>
llvm-svn: 283479
|
|
|
|
|
|
|
| |
A '*' as a field width or precision specifies that the field width or
precision is supplied by an int argument.
llvm-svn: 283472
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is better for a number of reasons. Mostly style, but also:
1) Signed-unsigned comparison warnings disappear since there is
no loop index.
2) Iterating with the range-for style gives you back an entry
that has more than just a const char*, so it's more efficient
and more useful.
3) Makes code safter since the type system enforces that it's
impossible to index out of bounds.
llvm-svn: 283413
|
|
|
|
| |
llvm-svn: 283386
|
|
|
|
| |
llvm-svn: 283385
|
|
|
|
| |
llvm-svn: 283384
|
|
|
|
| |
llvm-svn: 283370
|
|
|
|
|
|
| |
Differential Revision: https://reviews.llvm.org/D25247
llvm-svn: 283344
|
|
|
|
|
|
| |
I missed an if/else branch when doing the conversion.
llvm-svn: 283176
|
|
|
|
|
|
|
| |
Mostly this involves simplifying some logical constructs and using
some ranges instead of index-based iteration. NFC
llvm-svn: 283159
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There were a number of issues with the Args class preventing
efficient use of strings and incoporating LLVM's StringRef class.
The two biggest were:
1. Backing memory stored in a std::string, so we would frequently
have to use const_cast to get a mutable buffer for passing to
various low level APIs.
2. backing std::strings stored in a std::list, which doesn't
provide random access.
I wanted to solve these two issues so that we could provide
StringRef access to the underlying arguments, and also a way
to provide range-based access to the underlying argument array
while still providing convenient c-style access via an argv style
const char**.
The solution here is to store arguments in a single "entry" class
which contains the backing memory, a StringRef with precomputed
length, and the quote char. The backing memory is a manually
allocated const char* so that it is not invalidated when the
container is resized, and there is a separate argv array provided
for c-style access.
Differential revision: https://reviews.llvm.org/D25099
llvm-svn: 283157
|
|
|
|
|
|
|
|
|
|
|
| |
CommandData breakpoint commands didn't know whether they were
Python or Command line commands, so they couldn't serialize &
deserialize themselves properly. Fix that.
I also changed the "breakpoint list" command to note in the output
when the commands are Python commands. Fortunately only one test
was relying on this explicit bit of text output.
llvm-svn: 282432
|
|
|
|
| |
llvm-svn: 282271
|
|
|
|
| |
llvm-svn: 282270
|
|
|
|
| |
llvm-svn: 282269
|
|
|
|
|
|
|
|
| |
Then deal with all the fallout.
Differential Revision: https://reviews.llvm.org/D24847
llvm-svn: 282265
|
|
|
|
|
|
|
| |
It doesn't like the implicit conversion from T[] to ArrayRef<T>
so I'm using `llvm::makeArrayRef()`. Hopefully I got everything.
llvm-svn: 282195
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change is very mechanical. All it does is change the
signature of `Options::GetDefinitions()` and `OptionGroup::
GetDefinitions()` to return an `ArrayRef<OptionDefinition>`
instead of a `const OptionDefinition *`. In the case of the
former, it deletes the sentinel entry from every table, and
in the case of the latter, it removes the `GetNumDefinitions()`
method from the interface. These are no longer necessary as
`ArrayRef` carries its own length.
In the former case, iteration was done by using a sentinel
entry, so there was no knowledge of length. Because of this
the individual option tables were allowed to be defined below
the corresponding class (after all, only a pointer was needed).
Now, however, the length must be known at compile time to
construct the `ArrayRef`, and as a result it is necessary to
move every option table before its corresponding class. This
results in this CL looking very big, but in terms of substance
there is not much here.
Differential revision: https://reviews.llvm.org/D24834
llvm-svn: 282188
|
|
|
|
|
|
|
|
| |
Also fixed up a couple misbehaving functions. It is perfectly
legal to have env vars with no values (i.e. the '=' and following
need not be present).
llvm-svn: 282171
|
|
|
|
|
|
|
|
| |
The method was hard-coded to check only the 0th element of the array.
This manifested as NSLog messages behaving incorrectly on macOS.
(This is independent of the broken DarwinLog feature).
llvm-svn: 282128
|