commit | 9410276cf7c46ceade1cc812a7d30e6ae0b3d2d1 | [log] [tgz] |
---|---|---|
author | Martin Storsjo <martin@martin.st> | Mon May 07 20:27:28 2018 +0000 |
committer | Martin Storsjo <martin@martin.st> | Mon May 07 20:27:28 2018 +0000 |
tree | 12c40734acca68c7a1d89231fba5fa35c6e5f06a | |
parent | 28ae894a1d542a246179aab82c5b6bf2a0cee424 [diff] [blame] |
[llvm-rc] Allow optional commas between the string table index and value This form is even used in one of the examples at https://msdn.microsoft.com/en-us/library/windows/desktop/aa381050(v=vs.85).aspx. Differential Revision: https://reviews.llvm.org/D46508 llvm-svn: 331669
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp index 14fe4b4..d8398b7 100644 --- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp +++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -573,6 +573,7 @@ // Some examples in documentation suggest that there might be a comma in // between, however we strictly adhere to the single statement definition. ASSIGN_OR_RETURN(IDResult, readInt()); + consumeOptionalType(Kind::Comma); ASSIGN_OR_RETURN(StrResult, readString()); Table->addString(*IDResult, *StrResult); }