[llvm-rc] Implement the BITMAP resource type
Differential Revision: https://reviews.llvm.org/D46509
llvm-svn: 331670
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.cpp b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
index d8398b7..ffa18bd 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.cpp
@@ -66,6 +66,8 @@
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 @@
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);