summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceFileWriter.h
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2017-10-06 20:51:20 +0000
committerZachary Turner <zturner@google.com>2017-10-06 20:51:20 +0000
commit420090af89bacc97ce9c9c28eb3d32d0c704ca53 (patch)
treee7e7c3a236813be6ef8dfdcde0f3c7f1ba847fdf /llvm/tools/llvm-rc/ResourceFileWriter.h
parente9baea817822ec183f521c444b37d257aabbc655 (diff)
downloadbcm5719-llvm-420090af89bacc97ce9c9c28eb3d32d0c704ca53.tar.gz
bcm5719-llvm-420090af89bacc97ce9c9c28eb3d32d0c704ca53.zip
[llvm-rc] Add optional serialization support for DIALOG(EX) resources.
This is part 5 of llvm-rc serialization support. This allows DIALOG and DIALOGEX to serialize if dialog-specific optional statements are provided. These are (as of now): CAPTION, FONT, and STYLE. Notably, FONT statement can take more than two arguments when describing DIALOGEX resources (as in msdn.microsoft.com/en-us/library/windows/desktop/aa381013.aspx). I made some changes to the parser to reflect this fact. Patch by Marek Sokolowski Differential Revision: https://reviews.llvm.org/D37864 llvm-svn: 315104
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceFileWriter.h')
-rw-r--r--llvm/tools/llvm-rc/ResourceFileWriter.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.h b/llvm/tools/llvm-rc/ResourceFileWriter.h
index e9f9695cca6..1370c6168d2 100644
--- a/llvm/tools/llvm-rc/ResourceFileWriter.h
+++ b/llvm/tools/llvm-rc/ResourceFileWriter.h
@@ -35,8 +35,11 @@ public:
Error visitHTMLResource(const RCResource *) override;
Error visitMenuResource(const RCResource *) override;
+ Error visitCaptionStmt(const CaptionStmt *) override;
Error visitCharacteristicsStmt(const CharacteristicsStmt *) override;
+ Error visitFontStmt(const FontStmt *) override;
Error visitLanguageStmt(const LanguageResource *) override;
+ Error visitStyleStmt(const StyleStmt *) override;
Error visitVersionStmt(const VersionStmt *) override;
struct ObjectInfo {
@@ -44,6 +47,17 @@ public:
uint32_t Characteristics;
uint32_t VersionInfo;
+ Optional<uint32_t> Style;
+ StringRef Caption;
+ struct FontInfo {
+ uint32_t Size;
+ StringRef Typeface;
+ uint32_t Weight;
+ bool IsItalic;
+ uint32_t Charset;
+ };
+ Optional<FontInfo> Font;
+
ObjectInfo() : LanguageInfo(0), Characteristics(0), VersionInfo(0) {}
} ObjectData;
OpenPOWER on IntegriCloud