diff options
author | Zachary Turner <zturner@google.com> | 2017-10-06 20:51:20 +0000 |
---|---|---|
committer | Zachary Turner <zturner@google.com> | 2017-10-06 20:51:20 +0000 |
commit | 420090af89bacc97ce9c9c28eb3d32d0c704ca53 (patch) | |
tree | e7e7c3a236813be6ef8dfdcde0f3c7f1ba847fdf /llvm/tools/llvm-rc/ResourceScriptStmt.cpp | |
parent | e9baea817822ec183f521c444b37d257aabbc655 (diff) | |
download | bcm5719-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/ResourceScriptStmt.cpp')
-rw-r--r-- | llvm/tools/llvm-rc/ResourceScriptStmt.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-rc/ResourceScriptStmt.cpp b/llvm/tools/llvm-rc/ResourceScriptStmt.cpp index 3897ca3a512..dbfed4c55a1 100644 --- a/llvm/tools/llvm-rc/ResourceScriptStmt.cpp +++ b/llvm/tools/llvm-rc/ResourceScriptStmt.cpp @@ -247,7 +247,11 @@ raw_ostream &CaptionStmt::log(raw_ostream &OS) const { } raw_ostream &FontStmt::log(raw_ostream &OS) const { - return OS << "Font: size = " << Size << ", face = " << Typeface << "\n"; + OS << "Font: size = " << Size << ", face = " << Name + << ", weight = " << Weight; + if (Italic) + OS << ", italic"; + return OS << ", charset = " << Charset << "\n"; } raw_ostream &StyleStmt::log(raw_ostream &OS) const { |