     }
     assert(fieldsCost <= totalFieldCostRequiringStorage)
 
-    return AnalyseResult(fieldsCost)
+    return AnalyzeResult(fieldsCost)
   }
 
   let result = helper(descriptor)

    case .bytes:
      return FieldCost.singleBytes
    case .group, .message:
      return analyse(descriptor: field.messageType!).costAsField
    }
  }
}


  /// The message should use storage.
  static let useStorage =
    AnalyzeResult(usesStorage: true, costAsField: FieldCost.singleMessageFieldUsingStorage)
}

/// Cache for the `analyze(descriptor:)` results to avoid doing them multiple
/// times.
fileprivate var analysisCache: Dictionary<String,AnalyzeResult> = [
  // google.protobuf.Any can be seeded.
  ".google.protobuf.Any": .useStorage,
]

/// Analyze the given descriptor to decide if it should use storage and what
/// the cost of it will be when appearing as a single field in another message.
fileprivate func analyze(descriptor: Descriptor) -> AnalyzeResult {
  if let analysis = analysisCache[descriptor.fullName] {
    return analysis
  }
