diff options
author | Martin Storsjo <martin@martin.st> | 2018-05-15 19:21:28 +0000 |
---|---|---|
committer | Martin Storsjo <martin@martin.st> | 2018-05-15 19:21:28 +0000 |
commit | e241ce6f65f1c6373886a6c7f505fc59d0bf244d (patch) | |
tree | 39c14204c332c6493c05b13a82c88a2a21d748c0 /llvm/tools/llvm-rc/ResourceFileWriter.cpp | |
parent | 67cfbaac8973f1f0cf85bd2e90c74b42792ceada (diff) | |
download | bcm5719-llvm-e241ce6f65f1c6373886a6c7f505fc59d0bf244d.tar.gz bcm5719-llvm-e241ce6f65f1c6373886a6c7f505fc59d0bf244d.zip |
[llvm-rc] Add support for the optional CLASS statement for dialogs
Differential Revision: https://reviews.llvm.org/D46875
llvm-svn: 332386
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceFileWriter.cpp')
-rw-r--r-- | llvm/tools/llvm-rc/ResourceFileWriter.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.cpp b/llvm/tools/llvm-rc/ResourceFileWriter.cpp index 99fdb82f793..4b561940d2e 100644 --- a/llvm/tools/llvm-rc/ResourceFileWriter.cpp +++ b/llvm/tools/llvm-rc/ResourceFileWriter.cpp @@ -458,6 +458,11 @@ Error ResourceFileWriter::visitCaptionStmt(const CaptionStmt *Stmt) { return Error::success(); } +Error ResourceFileWriter::visitClassStmt(const ClassStmt *Stmt) { + ObjectData.Class = Stmt->Value; + return Error::success(); +} + Error ResourceFileWriter::visitHTMLResource(const RCResource *Res) { return writeResource(Res, &ResourceFileWriter::writeHTMLBody); } @@ -1120,8 +1125,8 @@ Error ResourceFileWriter::writeDialogBody(const RCResource *Base) { // think there is no menu attached to the dialog. writeInt<uint16_t>(0); - // Window CLASS field. Not kept here. - writeInt<uint16_t>(0); + // Window CLASS field. + RETURN_IF_ERROR(writeIntOrString(ObjectData.Class)); // Window title or a single word equal to 0. RETURN_IF_ERROR(writeCString(ObjectData.Caption)); |