summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptParser.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-05-07 20:27:37 +0000
committerMartin Storsjo <martin@martin.st>2018-05-07 20:27:37 +0000
commit577b98174834401222f8353c2ad8d1a7d9306965 (patch)
tree9d729230fa6a6bd9aeb30c4c0b9263e958f0f8f3 /llvm/tools/llvm-rc/ResourceScriptParser.cpp
parent9410276cf7c46ceade1cc812a7d30e6ae0b3d2d1 (diff)
downloadbcm5719-llvm-577b98174834401222f8353c2ad8d1a7d9306965.tar.gz
bcm5719-llvm-577b98174834401222f8353c2ad8d1a7d9306965.zip
[llvm-rc] Implement the BITMAP resource type
Differential Revision: https://reviews.llvm.org/D46509 llvm-svn: 331670
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptParser.cpp')
-rw-r--r--llvm/tools/llvm-rc/ResourceScriptParser.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
index d8398b78514..ffa18bdf198 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -66,6 +66,8 @@ RCParser::ParseType RCParser::parseSingleResource() {
if (TypeToken->equalsLower("ACCELERATORS"))
Result = parseAcceleratorsResource();
+ else if (TypeToken->equalsLower("BITMAP"))
+ Result = parseBitmapResource();
else if (TypeToken->equalsLower("CURSOR"))
Result = parseCursorResource();
else if (TypeToken->equalsLower("DIALOG"))
@@ -484,6 +486,11 @@ Expected<Control> RCParser::parseControl() {
TakeOptArg(7));
}
+RCParser::ParseType RCParser::parseBitmapResource() {
+ ASSIGN_OR_RETURN(Arg, readString());
+ return llvm::make_unique<BitmapResource>(*Arg);
+}
+
RCParser::ParseType RCParser::parseIconResource() {
ASSIGN_OR_RETURN(Arg, readString());
return llvm::make_unique<IconResource>(*Arg);
OpenPOWER on IntegriCloud