This allows to process HTML resources defined in .rc scripts and output them to resulting .res files. Additionally, some infrastructure allowing to output these files is created.
This is the first resource type we can operate on.
Paths
| Differential D37283
[llvm-rc] Serialize HTML resources to .res files (serialization, pt 1). ClosedPublic Authored by mnbvmar on Aug 29 2017, 5:58 PM.
Details
Summary This allows to process HTML resources defined in .rc scripts and output them to resulting .res files. Additionally, some infrastructure allowing to output these files is created. This is the first resource type we can operate on.
Diff Detail
Event Timelinemnbvmar added a parent revision: D37033: [llvm-rc] Add user-defined resources parsing ability. [8/8].
mnbvmar retitled this revision from [llvm-rc] Output .res files for HTML resource. to [llvm-rc] Serialize HTML resources to .res files (serialization, pt 1).. Comment ActionsRefactored the code to simplify the patches following this one. Previously, resource classes had ability to output themselves, using and possibly modifying the current context. Now, Visitor class is introduced which holds the current context and processes resources one by one and serializes them. This still holds the ability to output HTML resources. Comment Actions This fixes @ecbeckmann's comment https://reviews.llvm.org/D37824#inline-329768 (set type IDs and memory flags as constants). It's probably better to fix this in the first patch this appears in.
Comment Actions Style fixes suggested in the comments. Integrated llvm-readobj into test invocation. (I changed file and class names to ResourceFileWriter. However, I leave the revision as-is not to make confusion.) This revision is now accepted and ready to land.Sep 21 2017, 2:11 PM
Revision Contents
Diff 113182 llvm/test/tools/llvm-rc/Inputs/output-boundary-values-error-1.rc
llvm/test/tools/llvm-rc/Inputs/output-boundary-values-error-2.rc
llvm/test/tools/llvm-rc/Inputs/tag-html.rc
llvm/test/tools/llvm-rc/Inputs/webpage1.html
llvm/test/tools/llvm-rc/Inputs/webpage2.html
llvm/test/tools/llvm-rc/helpmsg.test
llvm/test/tools/llvm-rc/output-boundary-values.test
llvm/test/tools/llvm-rc/parser-expr.test
llvm/test/tools/llvm-rc/parser.test
llvm/test/tools/llvm-rc/tag-html.test
llvm/tools/llvm-rc/Opts.td
llvm/tools/llvm-rc/ResourceScriptParser.cpp
llvm/tools/llvm-rc/ResourceScriptStmt.h
llvm/tools/llvm-rc/ResourceScriptStmt.cpp
llvm/tools/llvm-rc/llvm-rc.cpp
|
nit: personally I like RUN: rm -rf %t && mkdir %t && cd %t as the standard one-line idiom for "get this test a clean working directory"