This is an archive of the discontinued LLVM Phabricator instance.

[llvm] Replace llvm::Any with std::any
ClosedPublic

Authored by sebastian-ne on Dec 7 2022, 5:27 AM.

Details

Summary

llvm::Any had several bugs in the past, due to being sensitive to symbol
visibility. (See D101972 and D108943)

Even with these fixes applied, I still encounter the same issue on
Windows.

Similar to llvm::Optional going away in favor of std::optional, we can
use std::any from C++17.

Using std::any fixes the problem and puts the burden to do it correctly
on the standard library.

Diff Detail

Event Timeline

sebastian-ne created this revision.Dec 7 2022, 5:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2022, 5:27 AM
sebastian-ne requested review of this revision.Dec 7 2022, 5:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 7 2022, 5:27 AM
MaskRay accepted this revision.Dec 7 2022, 6:36 AM
This revision is now accepted and ready to land.Dec 7 2022, 6:36 AM
This revision was landed with ongoing or failed builds.Dec 8 2022, 2:48 AM
This revision was automatically updated to reflect the committed changes.