Skip to content

Commit

Permalink
Add using for some types to work around compiler crash SR70253 (#14)
Browse files Browse the repository at this point in the history
Reference some types so that they are included in the CXX module.
  • Loading branch information
hjyamauchi authored Dec 6, 2023
1 parent d4f6970 commit bd49521
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions firestore/src/include/firebase/firestore/map_field_value.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ using MapFieldValue = std::unordered_map<std::string, FieldValue>;
/** @brief A map of `FieldValue`s indexed by field paths. */
using MapFieldPathValue = std::unordered_map<FieldPath, FieldValue>;

#if defined(__swift__)
// Reference the following types so that they are included in the CXX
// module. A workaround for deserialization cross reference compiler
// crashes https://github.com/apple/swift/issues/70253
using FieldValueVector = std::vector<FieldValue>;
using FieldValueVectorConstIterator = std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types<FieldValue>>>;
using StringVectorConstIterator = std::vector<std::string>::const_iterator;
#endif

} // namespace firestore
} // namespace firebase

Expand Down

0 comments on commit bd49521

Please sign in to comment.