summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-rc/ResourceFileWriter.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2018-12-05 13:22:56 +0000
committerMartin Storsjo <martin@martin.st>2018-12-05 13:22:56 +0000
commitd0afe724d1f5ca3e0a46e75849450a934ffa5ef2 (patch)
tree25e93ff9bf602eb78d53188e8b625406c173b4d7 /llvm/tools/llvm-rc/ResourceFileWriter.cpp
parent8fdaf5c915de88bb7026afb709460a0d6bf81162 (diff)
downloadbcm5719-llvm-d0afe724d1f5ca3e0a46e75849450a934ffa5ef2.tar.gz
bcm5719-llvm-d0afe724d1f5ca3e0a46e75849450a934ffa5ef2.zip
[llvm-rc] Support not expressions.
Patch by Jacek Caban! Differential Revision: https://reviews.llvm.org/D55242 llvm-svn: 348363
Diffstat (limited to 'llvm/tools/llvm-rc/ResourceFileWriter.cpp')
-rw-r--r--llvm/tools/llvm-rc/ResourceFileWriter.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/tools/llvm-rc/ResourceFileWriter.cpp b/llvm/tools/llvm-rc/ResourceFileWriter.cpp
index e69d4793dd1..7fe95669083 100644
--- a/llvm/tools/llvm-rc/ResourceFileWriter.cpp
+++ b/llvm/tools/llvm-rc/ResourceFileWriter.cpp
@@ -987,7 +987,8 @@ Error ResourceFileWriter::writeSingleDialogControl(const Control &Ctl,
padStream(sizeof(uint32_t));
auto TypeInfo = Control::SupportedCtls.lookup(Ctl.Type);
- uint32_t CtlStyle = TypeInfo.Style | Ctl.Style.getValueOr(0);
+ IntWithNotMask CtlStyle(TypeInfo.Style);
+ CtlStyle |= Ctl.Style.getValueOr(RCInt(0));
uint32_t CtlExtStyle = Ctl.ExtStyle.getValueOr(0);
// DIALOG(EX) item header prefix.
@@ -995,7 +996,7 @@ Error ResourceFileWriter::writeSingleDialogControl(const Control &Ctl,
struct {
ulittle32_t Style;
ulittle32_t ExtStyle;
- } Prefix{ulittle32_t(CtlStyle), ulittle32_t(CtlExtStyle)};
+ } Prefix{ulittle32_t(CtlStyle.getValue()), ulittle32_t(CtlExtStyle)};
writeObject(Prefix);
} else {
struct {
@@ -1003,7 +1004,7 @@ Error ResourceFileWriter::writeSingleDialogControl(const Control &Ctl,
ulittle32_t ExtStyle;
ulittle32_t Style;
} Prefix{ulittle32_t(Ctl.HelpID.getValueOr(0)), ulittle32_t(CtlExtStyle),
- ulittle32_t(CtlStyle)};
+ ulittle32_t(CtlStyle.getValue())};
writeObject(Prefix);
}
OpenPOWER on IntegriCloud