[all-commits] [llvm/llvm-project] 37e964: [llvm-rc] Allow specifying language with a leading...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Fri Aug 6 12:39:53 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: 37e964d8a623f6ae6a9e3e95bfc2d6503b9586eb
      https://github.com/llvm/llvm-project/commit/37e964d8a623f6ae6a9e3e95bfc2d6503b9586eb
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-08-06 (Fri, 06 Aug 2021)

  Changed paths:
    M llvm/test/tools/llvm-rc/codepage.test
    M llvm/test/tools/llvm-rc/language.test
    M llvm/tools/llvm-rc/llvm-rc.cpp

  Log Message:
  -----------
  [llvm-rc] Allow specifying language with a leading 0x prefix

This option is always interpreted strictly as a hexadecimal string,
even if it has no prefix that indicates the number format, hence
the existing call to StringRef::getAsInteger(16, ...).

StringRef::getAsInteger(0, ...) consumes a leading "0x" prefix is
present, but when the radix is specified, the radix shouldn't
be included.

Both MS rc.exe and GNU windres accept the language with that
prefix.

Also allow specifying the codepage to llvm-windres with a different
radix, as GNU windres allows that (but MS rc.exe doesn't).

This fixes https://llvm.org/PR51295.

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

(cherry picked from commit 46020f6f0c8aa134002208b2ecf0593b04c46d08)




More information about the All-commits mailing list