summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptParser.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-05-07 20:27:28 +0000
committerMartin Storsjo <martin@martin.st>2018-05-07 20:27:28 +0000
commit9410276cf7c46ceade1cc812a7d30e6ae0b3d2d1 (patch)
tree12c40734acca68c7a1d89231fba5fa35c6e5f06a /llvm/tools/llvm-rc/ResourceScriptParser.cpp
parent28ae894a1d542a246179aab82c5b6bf2a0cee424 (diff)
downloadbcm5719-llvm-9410276cf7c46ceade1cc812a7d30e6ae0b3d2d1.tar.gz
bcm5719-llvm-9410276cf7c46ceade1cc812a7d30e6ae0b3d2d1.zip
[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
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptParser.cpp')
-rw-r--r--llvm/tools/llvm-rc/ResourceScriptParser.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
index 14fe4b4583a..d8398b78514 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -573,6 +573,7 @@ RCParser::ParseType RCParser::parseStringTableResource() {
// 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);
}
OpenPOWER on IntegriCloud