summaryrefslogtreecommitdiffstats
path: root/lld/ELF/ScriptParser.h
Commit message (Collapse)AuthorAgeFilesLines
* [ELF] Fix variable names in comments after VariableName -> variableName changeFangrui Song2019-07-161-1/+1
| | | | | | Also fix some typos. llvm-svn: 366181
* [Coding style change] Rename variables so that they start with a lowercase ↵Rui Ueyama2019-07-101-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | letter This patch is mechanically generated by clang-llvm-rename tool that I wrote using Clang Refactoring Engine just for creating this patch. You can see the source code of the tool at https://reviews.llvm.org/D64123. There's no manual post-processing; you can generate the same patch by re-running the tool against lld's code base. Here is the main discussion thread to change the LLVM coding style: https://lists.llvm.org/pipermail/llvm-dev/2019-February/130083.html In the discussion thread, I proposed we use lld as a testbed for variable naming scheme change, and this patch does that. I chose to rename variables so that they are in camelCase, just because that is a minimal change to make variables to start with a lowercase letter. Note to downstream patch maintainers: if you are maintaining a downstream lld repo, just rebasing ahead of this commit would cause massive merge conflicts because this patch essentially changes every line in the lld subdirectory. But there's a remedy. clang-llvm-rename tool is a batch tool, so you can rename variables in your downstream repo with the tool. Given that, here is how to rebase your repo to a commit after the mass renaming: 1. rebase to the commit just before the mass variable renaming, 2. apply the tool to your downstream repo to mass-rename variables locally, and 3. rebase again to the head. Most changes made by the tool should be identical for a downstream repo and for the head, so at the step 3, almost all changes should be merged and disappear. I'd expect that there would be some lines that you need to merge by hand, but that shouldn't be too many. Differential Revision: https://reviews.llvm.org/D64121 llvm-svn: 365595
* 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
* [ELF] Support expressions with -defsym optionPetr Hosek2017-11-041-0/+3
| | | | | | | | Fixes PR34948. Differential Revision: https://reviews.llvm.org/D39511 llvm-svn: 317396
* Move new lld's code to Common subdirectory.Rui Ueyama2017-10-021-1/+1
| | | | | | | | | | New lld's files are spread under lib subdirectory, and it isn't easy to find which files are actually maintained. This patch moves maintained files to Common subdirectory. Differential Revision: https://reviews.llvm.org/D37645 llvm-svn: 314719
* Move the parser for the linker script to a separate file.Rui Ueyama2017-04-051-0/+31
| | | | | | | | LinkerScript.cpp contains both the linker script processor and the linker script parser. I put both into a single file, but the file grown too large, so it's time to put them into two different files. llvm-svn: 299515
* Rename ScriptParser.{cpp,h} -> ScriptLexer.{cpp,h}.Rui Ueyama2017-02-141-53/+0
| | | | | | | These files contain a lexer, so the new names are better. The parser is in LinkerScript.{cpp,h}. llvm-svn: 295022
* Handle the case where 'local' is the name of a global in a version script:Dmitry Mikulin2017-02-071-1/+1
| | | | | | { global : local; local: *; }; llvm-svn: 294343
* Simplify ScriptParser.Rui Ueyama2016-12-011-1/+1
| | | | | | | | - Rename currentBuffer -> getCurrentMB to start it with verb. - Simplify containsString. - Add llvm_unreachable at end of getCurrentMB. llvm-svn: 288310
* Make get{Line,Column}Number members of StringParser.Rui Ueyama2016-12-011-1/+5
| | | | | | This patch also renames currentLocation getCurrentLocation. llvm-svn: 288308
* [ELF] Print file:line for 'undefined section' errorsEugene Leviant2016-11-281-0/+1
| | | | | | Differential revision: https://reviews.llvm.org/D27108 llvm-svn: 288019
* [ELF] Better error reporting for linker scriptsEugene Leviant2016-11-211-7/+7
| | | | | | Differential revision: https://reviews.llvm.org/D26795 llvm-svn: 287547
* Rename skip(StringRef) -> consume(StringRef).Rui Ueyama2016-10-171-1/+1
| | | | | | | | skip() and skip(StringRef) were overloaded functions that have different semantics. This patch rename one of the functions to avoid function overloading. llvm-svn: 284396
* ELF: Add a skip() overload to ignore any tokenJustin Bogner2016-10-171-0/+1
| | | | | | | | | Most functions that return StringRef should check their return values, so I'm planning on marking StringRef [[nodiscard]]. This requires splitting up functions like next() that are sometimes just used for side effects. llvm-svn: 284363
* Remove dead ctor.Rui Ueyama2016-07-301-2/+0
| | | | llvm-svn: 277255
* Create Strings.cpp and move string manipulation functions to that file.Rui Ueyama2016-06-291-2/+0
| | | | llvm-svn: 274109
* Apply clang-tidy's misc-move-constructor-init to lld.Benjamin Kramer2016-06-031-1/+2
| | | | | | No functionality change intended. llvm-svn: 271686
* Add `explicit`.Rui Ueyama2016-05-161-2/+3
| | | | llvm-svn: 269703
* Use ScriptParserBase features to parse linker script expressions.Rui Ueyama2016-04-231-0/+1
| | | | | | | | Previously, we have re-implemented utility functions such as `expect` or `next` in LinkerScript.cpp. This patch reuses the existing implementation that is in ScriptParser.cpp. llvm-svn: 267255
* Devirtualize ScriptParserBase. NFC.Rui Ueyama2016-04-221-3/+0
| | | | | | | | | | | ScriptParserBase class is a container of collection of various methods to parse linker script-ish text. It had a virtual method `run` to run the parser. But we don't have to enforce its descendents to implement that. It's up to them. This patch removes pure virtual function `run`. llvm-svn: 267246
* [lld] Fix build failure from r265600Adhemerval Zanella2016-04-061-0/+1
| | | | llvm-svn: 265603
* [lld] [ELF] Add ScriptParserBase classAdhemerval Zanella2016-04-061-0/+50
This patch add a base script tokenizer class to decouple parsing from linker script handling. The idea is to use this base class on dynamic list parsing (--dynamic-list option). No functionality added. llvm-svn: 265600
OpenPOWER on IntegriCloud