[PATCH] D46508: [llvm-rc] Allow optional commas between the string table index and value
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 6 14:34:40 PDT 2018
mstorsjo created this revision.
mstorsjo added reviewers: zturner, amccarth, mnbvmar.
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.
Repository:
rL LLVM
https://reviews.llvm.org/D46508
Files:
test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
tools/llvm-rc/ResourceScriptParser.cpp
Index: tools/llvm-rc/ResourceScriptParser.cpp
===================================================================
--- tools/llvm-rc/ResourceScriptParser.cpp
+++ 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);
}
Index: test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
===================================================================
--- test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
+++ test/tools/llvm-rc/Inputs/tag-stringtable-basic.rc
@@ -5,8 +5,8 @@
}
STRINGTABLE {
- 1 "b"
- 16 "bb"
+ 1, "b"
+ 16, "bb"
}
STRINGTABLE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46508.145415.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180506/37a725de/attachment.bin>
More information about the llvm-commits
mailing list