1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 02:33:06 +01:00
llvm-mirror/tools/llvm-rc
Martin Storsjö 872454e51b [llvm-rc] Allow string table values split into multiple string literals
This can practically easily be a product of combining strings with
macros in resource files.

This fixes https://github.com/mstorsjo/llvm-mingw/issues/140.

As string literals within llvm-rc are handled as StringRefs, each
referencing an uninterpreted slice of the input file, with actual
interpretation of the input string (codepage handling, unescaping etc)
done only right before writing them out to disk, it's hard to
concatenate them other than just bundling them up in a vector,
without rearchitecting a large part of llvm-rc.

This matches how the same already is supported in VersionInfoValue,
with a std::vector<IntOrString> Values.

MS rc.exe only supports concatenated string literals in version info
values (already supported), string tables (implemented in this patch)
and user data resources (easily implemented in a separate patch, but
hasn't been requested by any end user yet), while GNU windres supports
string immediates split into multiple strings anywhere (e.g. like
(100 ICON "myicon" ".ico"). Not sure if concatenation in other
statements actually is used in the wild though, in resource files
normally built by GNU windres.

Differential Revision: https://reviews.llvm.org/D85183

(cherry picked from commit b989fcbae6f179ad887d19ceef83ace1c00b87cc)
2020-08-05 19:59:38 +02:00
..
CMakeLists.txt [llvm-rc] Handle C preprocessor output 2018-05-09 18:21:03 +00:00
llvm-rc.cpp [llvm-rc] Implement the language id option 2020-06-23 11:14:07 +03:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Opts.td [llvm-rc] Implement the language id option 2020-06-23 11:14:07 +03:00
ResourceFileWriter.cpp [llvm-rc] Allow string table values split into multiple string literals 2020-08-05 19:59:38 +02:00
ResourceFileWriter.h [llvm-rc] Allow string table values split into multiple string literals 2020-08-05 19:59:38 +02:00
ResourceScriptCppFilter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ResourceScriptCppFilter.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ResourceScriptParser.cpp [llvm-rc] Allow string table values split into multiple string literals 2020-08-05 19:59:38 +02:00
ResourceScriptParser.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ResourceScriptStmt.cpp [llvm-rc] Allow string table values split into multiple string literals 2020-08-05 19:59:38 +02:00
ResourceScriptStmt.h [llvm-rc] Allow string table values split into multiple string literals 2020-08-05 19:59:38 +02:00
ResourceScriptToken.cpp std::isspace -> llvm::isSpace (where locale should be ignored) 2020-05-02 15:36:04 +02:00
ResourceScriptToken.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ResourceScriptTokenList.def Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ResourceVisitor.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00