summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceScriptStmt.cpp
diff options
context:
space:
mode:
authorMarek Sokolowski <mnbvmar@gmail.com>2017-09-30 00:38:52 +0000
committerMarek Sokolowski <mnbvmar@gmail.com>2017-09-30 00:38:52 +0000
commit7f7745c03815507ddda56914e25bdb0751333571 (patch)
treea8daf25fff429e336cfdace4bc4cdec28b53f6d2 /llvm/tools/llvm-rc/ResourceScriptStmt.cpp
parent17d0bb9611beb3e170caf9e1f4462c041265724b (diff)
downloadbcm5719-llvm-7f7745c03815507ddda56914e25bdb0751333571.tar.gz
bcm5719-llvm-7f7745c03815507ddda56914e25bdb0751333571.zip
[llvm-rc] Serialize DIALOG(EX) to .res files (serialization, pt 4).
This is now able to serialize DIALOG and DIALOGEX resources to .res files. It still can't parse dialog-specific CAPTION, FONT, and STYLE optional statement - these will be added in the following patch. A limited set of controls is included. However, more can be easily added by extending SupportedCtls map defined in ResourceScriptStmt.cpp. Differential Revision: https://reviews.llvm.org/D37862 llvm-svn: 314578
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceScriptStmt.cpp')
-rw-r--r--llvm/tools/llvm-rc/ResourceScriptStmt.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptStmt.cpp b/llvm/tools/llvm-rc/ResourceScriptStmt.cpp
index 3e5a0e4d32b..3897ca3a512 100644
--- a/llvm/tools/llvm-rc/ResourceScriptStmt.cpp
+++ b/llvm/tools/llvm-rc/ResourceScriptStmt.cpp
@@ -120,11 +120,14 @@ raw_ostream &StringTableResource::log(raw_ostream &OS) const {
return OS;
}
-const StringSet<> Control::SupportedCtls = {
- "LTEXT", "RTEXT", "CTEXT", "PUSHBUTTON", "DEFPUSHBUTTON", "EDITTEXT"};
-
-const StringSet<> Control::CtlsWithTitle = {"LTEXT", "RTEXT", "CTEXT",
- "PUSHBUTTON", "DEFPUSHBUTTON"};
+const StringMap<Control::CtlInfo> Control::SupportedCtls = {
+ {"LTEXT", CtlInfo{0x50020000, ClsStatic, true}},
+ {"CTEXT", CtlInfo{0x50020001, ClsStatic, true}},
+ {"RTEXT", CtlInfo{0x50020002, ClsStatic, true}},
+ {"PUSHBUTTON", CtlInfo{0x50010000, ClsButton, true}},
+ {"DEFPUSHBUTTON", CtlInfo{0x50010001, ClsButton, true}},
+ {"EDITTEXT", CtlInfo{0x50810000, ClsEdit, false}},
+};
raw_ostream &Control::log(raw_ostream &OS) const {
OS << " Control (" << ID << "): " << Type << ", title: " << Title
OpenPOWER on IntegriCloud