[llvm-rc] Refactoring needed for ACCELERATORS and MENU resources.
This is a part of llvm-rc serialization patch set (serialization, pt 1.5).
This:
* Unifies the internal representation of flags in ACCELERATORS and MENU
with the corresponding representation in .res files (noticed in
https://reviews.llvm.org/D37828#inline-329828).
* Creates an RCResource subclass, OptStatementsRCResource, describing
resource statements that can declare resource-local optional statements
(proposed in https://reviews.llvm.org/D37824#inline-329775).
These modifications don't fit to any of the current patches, so I'm
submitting them as a separate patch.
Differential Revision: https://reviews.llvm.org/D37841
llvm-svn: 314541
diff --git a/llvm/tools/llvm-rc/ResourceScriptParser.h b/llvm/tools/llvm-rc/ResourceScriptParser.h
index 7509b8e..b393bbc 100644
--- a/llvm/tools/llvm-rc/ResourceScriptParser.h
+++ b/llvm/tools/llvm-rc/ResourceScriptParser.h
@@ -106,10 +106,11 @@
// Read an unknown number of flags preceded by commas. Each correct flag
// has an entry in FlagDesc array of length NumFlags. In case i-th
- // flag (0-based) has been read, the i-th bit of the result is set.
+ // flag (0-based) has been read, the result is OR-ed with FlagValues[i].
// As long as parser has a comma to read, it expects to be fed with
// a correct flag afterwards.
- Expected<uint32_t> parseFlags(ArrayRef<StringRef> FlagDesc);
+ Expected<uint32_t> parseFlags(ArrayRef<StringRef> FlagDesc,
+ ArrayRef<uint32_t> FlagValues);
// Reads a set of optional statements. These can change the behavior of
// a number of resource types (e.g. STRINGTABLE, MENU or DIALOG) if provided