summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptStmt.h
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/ResourceScriptStmt.h
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/ResourceScriptStmt.h')
-rw-r--r--llvm/tools/llvm-rc/ResourceScriptStmt.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptStmt.h b/llvm/tools/llvm-rc/ResourceScriptStmt.h
index e44120b770f..485b7cab1d2 100644
--- a/llvm/tools/llvm-rc/ResourceScriptStmt.h
+++ b/llvm/tools/llvm-rc/ResourceScriptStmt.h
@@ -121,6 +121,7 @@ enum ResourceKind {
// kind is equal to this type ID.
RkNull = 0,
RkSingleCursor = 1,
+ RkBitmap = 2,
RkSingleIcon = 3,
RkMenu = 4,
RkDialog = 5,
@@ -305,6 +306,29 @@ public:
}
};
+// BITMAP resource. Represents a bitmap (".bmp") file.
+//
+// Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa380680(v=vs.85).aspx
+class BitmapResource : public RCResource {
+public:
+ StringRef BitmapLoc;
+
+ BitmapResource(StringRef Location) : BitmapLoc(Location) {}
+ raw_ostream &log(raw_ostream &) const override;
+
+ IntOrString getResourceType() const override { return RkBitmap; }
+ uint16_t getMemoryFlags() const override { return MfPure | MfMoveable; }
+
+ Twine getResourceTypeName() const override { return "BITMAP"; }
+ Error visit(Visitor *V) const override {
+ return V->visitBitmapResource(this);
+ }
+ ResourceKind getKind() const override { return RkBitmap; }
+ static bool classof(const RCResource *Res) {
+ return Res->getKind() == RkBitmap;
+ }
+};
+
// CURSOR resource. Represents a single cursor (".cur") file.
//
// Ref: msdn.microsoft.com/en-us/library/windows/desktop/aa380920(v=vs.85).aspx
OpenPOWER on IntegriCloud