   private let generatorOptions: GeneratorOptions
   private let namer: SwiftProtobufNamer
 
-  /// The values that aren't aliases, as ordered in the .proto.
-  private let mainEnumValueDescriptors: [EnumValueDescriptor]
+  /// The aliasInfo for the values.
+  private let aliasInfo: EnumDescriptor.ValueAliasInfo
   /// The values that aren't aliases, sorted by number.
   private let mainEnumValueDescriptorsSorted: [EnumValueDescriptor]
 

      "// The compiler won't synthesize support with the \(unrecognizedCaseName) case.",
      "\(visibility)static let allCases: [\(swiftFullName)] = [")
    p.withIndentation { p in
      for v in mainEnumValueDescriptors {
        let dottedName = namer.dottedRelativeName(enumValue: v)
        p.print("\(dottedName),")
      }

    self.enumDescriptor = descriptor
    self.generatorOptions = generatorOptions
    self.namer = namer
    aliasInfo = EnumDescriptor.ValueAliasInfo(enumDescriptor: descriptor)

    mainEnumValueDescriptorsSorted = aliasInfo.mainValues.sorted(by: {
      return $0.number < $1.number
    })

