[PATCH] D46238: [llvm-rc] Add rudimentary support for codepages

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 29 12:49:30 PDT 2018


mstorsjo created this revision.
mstorsjo added reviewers: zturner, mnbvmar.

Only support UTF-8 (since LLVM contains UTF-8 parsing support already, and the code even does that already) and Windows-1252 (where each code points has the same value in unicode). Keep the existing default as only allowing ASCII input.

Using the option type JoinedOrSeparate, since the real rc.exe handles options in this form, even if llvm-rc uses Separate for other similar existing options.

Rename the struct SearchParams to WriterParams since it's now used for more than just include paths.

Add a missing getResourceTypeName method to the BundleResource class, to fix error printing from within STRINGTABLE resources (used in tests).


Repository:
  rL LLVM

https://reviews.llvm.org/D46238

Files:
  test/tools/llvm-rc/Inputs/cp1252.rc
  test/tools/llvm-rc/Inputs/utf8-escape-narrow.rc
  test/tools/llvm-rc/Inputs/utf8.rc
  test/tools/llvm-rc/codepage.test
  test/tools/llvm-rc/helpmsg.test
  tools/llvm-rc/Opts.td
  tools/llvm-rc/ResourceFileWriter.cpp
  tools/llvm-rc/ResourceFileWriter.h
  tools/llvm-rc/llvm-rc.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46238.144493.patch
Type: text/x-patch
Size: 11243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180429/0717cf78/attachment.bin>


More information about the llvm-commits mailing list