aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-rc/ResourceScriptToken.cpp
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10Revert "Remove redundant "std::move"s in return statements"Bill Wendling1-1/+1
The build failed with error: call to deleted constructor of 'llvm::Error' errors. This reverts commit 1c2241a7936bf85aa68aef94bd40c3ba77d8ddf2.
2020-02-10Remove redundant "std::move"s in return statementsBill Wendling1-1/+1
2019-11-18llvm-rc - fix uninitialized variable warnings. NFC.Simon Pilgrim1-1/+1
2019-01-19Update the file headers across all of the LLVM projects in the monorepoChandler Carruth1-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
2018-05-08[llvm-rc] Don't strictly require quotes around external file namesMartin Storsjo1-2/+3
Regardless of what docs may say, existing resource files in the wild can use this syntax. Rename a file used in an existing test, to make it usable for unquoted paths. Differential Revision: https://reviews.llvm.org/D46511 llvm-svn: 331747
2017-11-21llvm-rc/ResourceScriptTokenList.h: Turns this into a .def file to imply that ↵David Blaikie1-6/+2
it's non-modular Also undef the macros at the end of the file to make it easier to use. llvm-svn: 318714
2017-10-09[llvm-rc] Have the tokenizer discard single & block comments.Zachary Turner1-0/+53
This allows rc files to have comments. Eventually we should just use clang's c preprocessor, but that's a bit larger effort for minimal gain, and this is straightforward. Differential Revision: https://reviews.llvm.org/D38651 llvm-svn: 315207
2017-10-06[llvm-rc] Implement escape sequences in .rc files.Zachary Turner1-1/+4
This allows the escape sequences (\a, \n, \r, \t, \\, \x[0-9a-f]*, \[0-7]*, "") to appear in .rc scripts. These are parsed and output in the same way as it's done in original MS implementation. The way these sequences are processed depends on the type of the resource it resides in, and on whether the user declared the string to be "wide" or "narrow". I tried to maintain the maximum compatibility with the original tool (and fail in some erroneous situations that are accepted by .rc). However, there are some (extremely rare) cases where Microsoft tool outputs nonsense. I found it infeasible to detect such casses. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D38426 llvm-svn: 315118
2017-10-06[llvm-rc] Serialize VERSIONINFO resources to .res files.Zachary Turner1-0/+4
This is now able to dump VERSIONINFO resources. Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa381058.aspx Differential Revision: https://reviews.llvm.org/D38410 Patch by: Marek Sokolowski llvm-svn: 315110
2017-09-28[llvm-rc] Add integer expressions parsing ability. [7/8]Marek Sokolowski1-0/+12
This allows the ints to be written as integer expressions evaluating to unsigned 16-bit/32-bit integers. All the expressions may use the following operators: + - & | ~, and parentheses. Minus token - can be also unary. There is no precedence of the operators other than the unary operators binding stronger than their binary counterparts. Differential Revision: https://reviews.llvm.org/D37022 llvm-svn: 314477
2017-09-07Fixing incorrectly capitalised regexps.Benjamin Kramer1-1/+1
Patch by Sam Allen! llvm-svn: 312709
2017-08-10Fix 'not all control paths return' warning on windows builds. NFCI.Simon Pilgrim1-3/+1
llvm-svn: 310631
2017-08-10Fixup for r310621: Hint the compilers about unreachable code.Marek Sokolowski1-0/+4
llvm-svn: 310623
2017-08-10Add .rc scripts tokenizer.Marek Sokolowski1-0/+296
This extends the shell of llvm-rc tool with the ability of tokenization of the input files. Currently, ASCII and ASCII-compatible UTF-8 files are supported. Thanks to Nico Weber (thakis) for his original work in this area. Differential Revision: https://reviews.llvm.org/D35957 llvm-svn: 310621