This is an archive of the discontinued LLVM Phabricator instance.

[Basic] Deprecate MapEntryOptionalStorage::{hasValue,getValue}
ClosedPublic

Authored by kazu on Aug 7 2022, 1:26 PM.

Details

Summary

MapEntryOptionalStorage is an underlying storage class for
OptionalStorage<clang::DirectoryEntryRef>.

This patch deprecates:

OptionalStorage<clang::DirectoryEntryRef>::hasValue
OptionalStorage<clang::DirectoryEntryRef>::getValue

as there is no known users of these two methods.

Diff Detail

Event Timeline

kazu created this revision.Aug 7 2022, 1:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2022, 1:26 PM
kazu requested review of this revision.Aug 7 2022, 1:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2022, 1:26 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript

Update this to use something like https://reviews.llvm.org/D131381 ?

kazu added a comment.Aug 8 2022, 4:51 PM

Update this to use something like https://reviews.llvm.org/D131381 ?

Great idea! Will do!

kazu updated this revision to Diff 451002.Aug 8 2022, 4:52 PM

Updated to use LLVM_DEPRECATED instead of [[deprecated]].

kazu added a comment.Aug 8 2022, 4:52 PM

PTAL. Thanks!

dblaikie accepted this revision.Aug 8 2022, 5:50 PM

Sounds good - I'd be probably OK with removing these outright as they're so niche/generally only for use by llvm::Optional anyway - but not much harm in keeping them around for the same period the other more visible APIs are deprecated and cleaning it all up together later/then.

This revision is now accepted and ready to land.Aug 8 2022, 5:50 PM
kazu added a comment.Aug 8 2022, 9:32 PM

Sounds good - I'd be probably OK with removing these outright as they're so niche/generally only for use by llvm::Optional anyway - but not much harm in keeping them around for the same period the other more visible APIs are deprecated and cleaning it all up together later/then.

Yeah, I was actually sitting on the fence, wondering whether I should just remove them now as they are internal details of llvm::Optional as you point out. I think I'll just remove them in three months or so along with other deprecated methods related to llvm::Optional.

This revision was landed with ongoing or failed builds.Aug 8 2022, 9:33 PM
This revision was automatically updated to reflect the committed changes.