summaryrefslogtreecommitdiffstats
path: root/lldb/source/Interpreter
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix some build errors.Zachary Turner2016-11-181-7/+4
| | | | llvm-svn: 287409
* Convert CommandHistory functions to StringRef.Zachary Turner2016-11-182-40/+45
| | | | llvm-svn: 287401
* Rewrite all Property related functions in terms of StringRef.Zachary Turner2016-11-175-262/+209
| | | | | | | | | | | | | | | 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
* Fix warnings and errors introduced with UUID changes.Zachary Turner2016-11-171-3/+2
| | | | llvm-svn: 287208
* Convert UriParser to use StringRef.Zachary Turner2016-11-171-2/+3
| | | | llvm-svn: 287190
* Convert AutoComplete related code to StringRef.Zachary Turner2016-11-178-42/+29
| | | | | | Differential Revision: https://reviews.llvm.org/D26721 llvm-svn: 287188
* Make Apropos functions accept StringRefs.Zachary Turner2016-11-162-7/+6
| | | | llvm-svn: 287157
* Don't allow direct access to StreamString's internal buffer.Zachary Turner2016-11-169-65/+73
| | | | | | | | | | | | | | | 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
* Change Property::GetName() and GetDescription() to return StringRef.Zachary Turner2016-11-152-52/+31
| | | | llvm-svn: 287055
* Fix some more Printf warnings.Zachary Turner2016-11-151-2/+3
| | | | llvm-svn: 286916
* Fix some more StringRef printf warnings.Zachary Turner2016-11-151-1/+1
| | | | llvm-svn: 286915
* Fix some StringRef Printf warnings.Zachary Turner2016-11-142-2/+2
| | | | llvm-svn: 286906
* Make OptionParser::Parse() take StringRef.Zachary Turner2016-11-131-6/+6
| | | | llvm-svn: 286747
* Change IOHandlerConfirm to use StringRefs.Zachary Turner2016-11-131-1/+1
| | | | llvm-svn: 286743
* Change some more CommandObject functions to StringRef.Zachary Turner2016-11-131-4/+4
| | | | llvm-svn: 286742
* Change ArgumentHelpCallbackFunction to return a StringRef.Zachary Turner2016-11-131-31/+22
| | | | llvm-svn: 286740
* Make CommandObject help getters/setters use StringRef.Zachary Turner2016-11-123-51/+45
| | | | llvm-svn: 286731
* Make CommandReturnObject methods accept StringRefs.Zachary Turner2016-11-121-20/+23
| | | | llvm-svn: 286728
* Make Options::SetOptionValue take a StringRef.Zachary Turner2016-11-121-3/+3
| | | | llvm-svn: 286723
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-112-4/+4
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Make the Error class constructor protectedMehdi Amini2016-11-112-4/+4
| | | | | | | | | 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
* Remove TimeValue usage from lldb/InterpreterPavel Labath2016-11-091-3/+2
| | | | llvm-svn: 286369
* Fix some cases where we were printf'ing StringRefs.Zachary Turner2016-11-081-3/+3
| | | | llvm-svn: 286303
* Convert some Expression parser functions to StringRef.Zachary Turner2016-11-081-86/+94
| | | | llvm-svn: 286208
* Rewrite OutputFormattedHelpText in terms of StringRef.Zachary Turner2016-11-081-60/+49
| | | | | | | | | | 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
* Fix Clang-tidy readability-redundant-string-cstr warningsMalcolm Parsons2016-11-026-10/+10
| | | | | | | | | | Reviewers: zturner, labath Subscribers: tberghammer, danalbert, lldb-commits Differential Revision: https://reviews.llvm.org/D26233 llvm-svn: 285855
* Remove TimeValue usage from FileSpec.hPavel Labath2016-11-011-5/+3
| | | | | | | | | | | | | | | | | | | | | 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
* Interpreter: Don't return StringRef from functions whose return value is ↵Justin Bogner2016-10-171-14/+10
| | | | | | | | | | 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
* Remove unused variable.Zachary Turner2016-10-071-1/+0
| | | | llvm-svn: 283603
* Convert UniqueCStringMap to use StringRef.Zachary Turner2016-10-062-12/+14
| | | | llvm-svn: 283494
* StringRef::front asserts on empty strings, causing "break modify -c ''" to ↵Jim Ingham2016-10-061-1/+1
| | | | | | | | | | assert. Added a check for empty at the point where we were going to crash. <rdar://problem/28654032> llvm-svn: 283479
* Match printf field width arg and typeEd Maste2016-10-061-1/+1
| | | | | | | A '*' as a field width or precision specifies that the field width or precision is supplied by an int argument. llvm-svn: 283472
* Convert some Args index-based iteration to range-style iteration.Zachary Turner2016-10-053-13/+12
| | | | | | | | | | | | | | 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
* Convert some more aliasing and CI functions to StringRef.Zachary Turner2016-10-051-13/+6
| | | | llvm-svn: 283386
* Update some command aliasing functions to use StringRef.Zachary Turner2016-10-052-21/+18
| | | | llvm-svn: 283385
* Convert CommandObject constructors to StringRef.Zachary Turner2016-10-056-100/+96
| | | | llvm-svn: 283384
* Convert various CommandInterpreter functions to StringRef.Zachary Turner2016-10-051-47/+40
| | | | llvm-svn: 283370
* Make lldb -Werror clean on Windows.Zachary Turner2016-10-052-5/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D25247 llvm-svn: 283344
* Fix TestNestedAliases.pyZachary Turner2016-10-041-5/+6
| | | | | | I missed an if/else branch when doing the conversion. llvm-svn: 283176
* Modernize some code related to Args usage / implementation.Zachary Turner2016-10-033-222/+205
| | | | | | | Mostly this involves simplifying some logical constructs and using some ranges instead of index-based iteration. NFC llvm-svn: 283159
* Refactor the Args class.Zachary Turner2016-10-031-291/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix serialization of Python breakpoint commands.Jim Ingham2016-09-261-0/+13
| | | | | | | | | | | 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
* Try again to match the logic of the code before re-writing.Zachary Turner2016-09-231-1/+1
| | | | llvm-svn: 282271
* Try to fix failing TestDataFormatterSkipSummary test case.Zachary Turner2016-09-231-1/+3
| | | | llvm-svn: 282270
* Update the prompt related functions to use StringRefs.Zachary Turner2016-09-233-13/+15
| | | | llvm-svn: 282269
* Update OptionGroup::SetValue to take StringRef.Zachary Turner2016-09-2320-121/+94
| | | | | | | | Then deal with all the fallout. Differential Revision: https://reviews.llvm.org/D24847 llvm-svn: 282265
* Try to fix build errors on Android.Zachary Turner2016-09-227-7/+7
| | | | | | | 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
* Convert option tables to ArrayRefs.Zachary Turner2016-09-2210-166/+114
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* added environment variable-related Args gtestsTodd Fiala2016-09-221-4/+6
| | | | | | | | 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
* fix Args function broken in r281942Todd Fiala2016-09-221-1/+1
| | | | | | | | 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
OpenPOWER on IntegriCloud