Skip to content

Conversation

@augusto2112
Copy link
Contributor

No description provided.

@augusto2112
Copy link
Contributor Author

@swift-ci smoke test

/// The dense map info for a std::pair<StoredPointer, bool>.
struct DenseMapInfoTypeCacheKey {
using Pair = std::pair<StoredPointer, bool>;
using StoredPointerInfo = llvm::DenseMapInfo<StoredPointer>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be necessary. DenseMapInfo has already a generic specialization for std::pair as long as both elements are supported. You should only need to define this for StoredPointer if at all.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DenseMapInfo has already a generic specialization for std::pair as long as both elements are supported

bool is not supported since it can't implement getEmptyKey or getTombstoneKey. This implementation uses only the StoredPointer's implementation for both those functions.

@augusto2112 augusto2112 merged commit 79cdadf into swiftlang:main Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants