This is an archive of the discontinued LLVM Phabricator instance.

[llvm-rc] Serialize ACCELERATORS resources to .res files (serialization, pt 2).
ClosedPublic

Authored by mnbvmar on Sep 13 2017, 1:16 PM.

Details

Summary

This allows llvm-rc to serialize ACCELERATORS resources.

Additionally, as this is the first type of resource to support basic optional resource statements (LANGUAGE, CHARACTERISTICS, VERSION),

ACCELERATORS statement documentation: msdn.microsoft.com/en-us/library/windows/desktop/aa380610.aspx
Accelerator table structure documentation: msdn.microsoft.com/en-us/library/windows/desktop/ms648010.aspx
Optional resource statement fields are described in: msdn.microsoft.com/en-us/library/windows/desktop/ms648027.aspx
(I somehow can't make these links to be clickable.)

Thanks for Nico Weber for his original work in this area.

Diff Detail

Repository
rL LLVM

Event Timeline

mnbvmar created this revision.Sep 13 2017, 1:16 PM
mnbvmar edited the summary of this revision. (Show Details)
mnbvmar edited the summary of this revision. (Show Details)
mnbvmar edited the summary of this revision. (Show Details)
ecbeckmann added inline comments.Sep 13 2017, 2:22 PM
llvm/tools/llvm-rc/ResourceScriptStmt.h
208 ↗(On Diff #115105)

define these type and memory flag values as enums/constants somewhere.

350 ↗(On Diff #115105)

This pattern occurs in at least 4 places, you should make a superclass called OptStatementsResource for example with the shared constructor. You only need OptStatements in that class as well.

mnbvmar updated this revision to Diff 115154.Sep 13 2017, 6:29 PM

Rebase wrt patch D37841.

mnbvmar updated this revision to Diff 116740.Sep 26 2017, 5:01 PM

Use llvm-readobj to examine the resulting .res files.

mnbvmar marked 2 inline comments as done.Sep 26 2017, 5:02 PM
rnk accepted this revision.Sep 27 2017, 10:59 AM

Looks good, thanks!

This revision is now accepted and ready to land.Sep 27 2017, 10:59 AM
This revision was automatically updated to reflect the committed changes.