summaryrefslogtreecommitdiffstats
path: root/lldb/source/Utility/DataEncoder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [lldb][NFC] Remove unused includes in Utility's source filesRaphael Isemann2019-12-131-2/+0
|
* [LLDB] Cleanup the DataEncoder utility. (NFC)Jonas Devlieghere2019-11-131-47/+3
| | | | | This commit removes unused methods from the DataEncoder class and cleans up the API by making all the internal methods private.
* [Utility] Modernize C-style catsJonas Devlieghere2019-05-231-3/+4
| | | | | | | | Replaces the remaining C-style casts with explicit casts in Utility. The motivation is that they are (1) easier to spot and (2) don't have multiple meanings. llvm-svn: 361458
* [NFC] Remove ASCII lines from commentsJonas Devlieghere2019-04-101-18/+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
* 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-1/+1
| | | | | | | | | | 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
* Reflow paragraphs in comments.Adrian Prantl2018-04-301-41/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* [DataEncoder] Replace buggy versions of write functions.Davide Italiano2017-12-131-36/+8
| | | | | | | | | This fixes a previously introduced thinko, now that I have a better idea of what's going on :) <rdar://problem/35941757> llvm-svn: 320540
* Revert "[DataEncoder] Replace buggy versions of write functions."Davide Italiano2017-12-111-8/+36
| | | | | | | The commit exposes a bunch of failures in the LLDB testsuite that I need to analyze more carefully. Reverting for now. llvm-svn: 320341
* [DataEncoder] Replace buggy versions of write functions.Davide Italiano2017-12-101-36/+8
| | | | | | | | | | They cause an ubsan error when ran through the testsuite (store to misaligned address is UB). This commit kills two birds with one stone, as we also remove some code while fixing it. <rdar://problem/35941757> llvm-svn: 320335
* iwyu fixes on lldbUtility.Zachary Turner2017-04-061-2/+3
| | | | | | | | | | | | | This patch makes adjustments to header file includes in lldbUtility based on recommendations by the iwyu tool (include-what-you-use). The goal here is to make sure that all files include the exact set of headers which are needed for that file only, to eliminate cases of dead includes (e.g. someone deleted some code but forgot to delete the header includes that that code necessitated), and to eliminate the case where header includes are picked up transitively. llvm-svn: 299676
* Move DataBuffer / DataExtractor and friends from Core -> Utility.Zachary Turner2017-03-041-0/+284
llvm-svn: 296943
OpenPOWER on IntegriCloud