This extends the set of parser's available resources by another one, VERSIONINFO (msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx).
Just .count(Type.upper()) seems more idiomatic.
Generally, you don't need to template over the size of a SmallVector. You can simply take a SmallVectorImpl<T> &, which is the base SmallVectors of any size.
However, for a const reference, it's usually better to accept an ArrayRef<T> Value. That is implicitly constructible from any SmallVector, and passes a pointer and size by value.
Does this need Name.upper()? I'm concerned about things like:
VERSIONINFO FileVersion 1, 2, 3 FILEVERSION 4, 5, 6 BEGIN END
Should that be an error? Maybe the best way to handle this is to have an enumeration, map from string to enum, maintain an array of all possible fields, and on set, check if the field is already set and report an error if so.
The original tool seems not to care about this one and just take the last occurrence of FILEVERSION. Of course, what you suggest is way better, and I think I'm going to do it your way.
Rewritten fixed fields implementation a little bit. Now, we have an enumeration describing fixed field types, a list of field names, and a mapping from names to their types.
Also, added a sanity check determining if the user provided multiple occurrences of the same fixed field.