summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/Status.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLDB] On Windows, force error message formatting to EnglishAlexandre Ganea2019-11-281-1/+10
| | | | | | This fixes the Utility/StatusTest.ErrorWin32 unit test on non-English locales. Differential Revision: https://reviews.llvm.org/D70442
* lldb: Fix some -Wdeprecated-copy warningsPavel Labath2019-11-111-10/+0
| | | | | | | | gcc-9 started warning when a class defined a copy constructor without a copy assignment operator (or vice-versa). This fixes those warnings by deleting the other special member too (after verifying it doesn't do anything non-trivial).
* Delete unnecessary copy ctors/copy assignment operatorsFangrui Song2019-05-151-2/+0
| | | | | | It's the simplest and gives the cleanest semantics. llvm-svn: 360762
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-26/+0
| | | | | | | | | | | | | | | | | | | | | | | A lot of comments in LLDB are surrounded by an ASCII line to delimit the begging and end of the comment. Its use is not really consistent across the code base, sometimes the lines are longer, sometimes they are shorter and sometimes they are omitted. Furthermore, it looks kind of weird with the 80 column limit, where the comment actually extends past the line, but not by much. Furthermore, when /// is used for Doxygen comments, it looks particularly odd. And when // is used, it incorrectly gives the impression that it's actually a Doxygen comment. I assume these lines were added to improve distinguishing between comments and code. However, given that todays editors and IDEs do a great job at highlighting comments, I think it's worth to drop this for the sake of consistency. The alternative is fixing all the inconsistencies, which would create a lot more churn. Differential revision: https://reviews.llvm.org/D60508 llvm-svn: 358135
* Bring Doxygen comment syntax in sync with LLVM coding style.Adrian Prantl2019-03-111-1/+1
| | | | | | This changes '@' prefix to '\'. llvm-svn: 355841
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Remove comments after header includes.Jonas Devlieghere2018-11-111-7/+7
| | | | | | | | | | This patch removes the comments following the header includes. They were added after running IWYU over the LLDB codebase. However they add little value, are often outdates and burdensome to maintain. Differential revision: https://reviews.llvm.org/D54385 llvm-svn: 346625
* [lldb] Add support in Status::AsCString to retrieve win32 system error stringsAaron Smith2018-10-191-1/+28
| | | | | | | | | | Reviewers: rnk, zturner, aleksandr.urakov Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D53092 llvm-svn: 344798
* Typo fixes.Bruce Mitchener2018-05-291-2/+2
| | | | | | | | | | Reviewers: javed.absar Subscribers: ki.stfu, JDevlieghere, lldb-commits Differential Revision: https://reviews.llvm.org/D47421 llvm-svn: 333399
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is intended as a clean up after the big clang-format commit (r280751), which unfortunately resulted in many of the comment paragraphs in LLDB being very hard to read. FYI, the script I used was: import textwrap import commands import os import sys import re tmp = "%s.tmp"%sys.argv[1] out = open(tmp, "w+") with open(sys.argv[1], "r") as f: header = "" text = "" comment = re.compile(r'^( *//) ([^ ].*)$') special = re.compile(r'^((([A-Z]+[: ])|([0-9]+ )).*)|(.*;)$') for line in f: match = comment.match(line) if match and not special.match(match.group(2)): # skip intentionally short comments. if not text and len(match.group(2)) < 40: out.write(line) continue if text: text += " " + match.group(2) else: header = match.group(1) text = match.group(2) continue if text: filled = textwrap.wrap(text, width=(78-len(header)), break_long_words=False) for l in filled: out.write(header+" "+l+'\n') text = "" out.write(line) os.rename(tmp, sys.argv[1]) Differential Revision: https://reviews.llvm.org/D46144 llvm-svn: 331197
* Remove uint32_t assignment operator from StatusPavel Labath2017-11-011-10/+0
| | | | | | | | | | | | | | | | Summary: It is not presently used, and it's quite dangerous to use -- it assumes the integer is an osx kern_return_t, but very few of the integers we have lying around are mach kernel error codes. The error can still be used to a mach error using a slightly longer (but more explicit) syntax. Reviewers: jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D35305 llvm-svn: 317093
* Add llvm::Error assignment operator to Status classPavel Labath2017-06-151-5/+10
| | | | | | This enables writing "status = std::move(some_llvm_error)". llvm-svn: 305462
* replace uses of strerror with llvm::sys::StrErrorPavel Labath2017-06-061-10/+8
| | | | | | | | strerror is not thread-safe. llvm's StrError tries hard to retrieve the string in a thread-safe way and falls back to strerror only if it does not have another way. llvm-svn: 304795
* Add Status -- llvm::Error gluePavel Labath2017-05-181-0/+31
| | | | | | | | | | | | | | | | | | | Summary: This adds functions to convert between llvm::Error and Status classes. Posix errors in Status are represented as llvm::ECError, and the rest as llvm::StringError. For the conversion from Error to Status, ECError is again represented as a posix error in Status, while other errors are stored as generic errors and only the string value is preserved. Reviewers: zturner, jingham Subscribers: lldb-commits Differential Revision: https://reviews.llvm.org/D33241 llvm-svn: 303348
* Rename Error -> Status.Zachary Turner2017-05-121-0/+275
This renames the LLDB error class to Status, as discussed on the lldb-dev mailing list. A change of this magnitude cannot easily be done without find and replace, but that has potential to catch unwanted occurrences of common strings such as "Error". Every effort was made to find all the obvious things such as the word "Error" appearing in a string, etc, but it's possible there are still some lingering occurences left around. Hopefully nothing too serious. llvm-svn: 302872
OpenPOWER on IntegriCloud