[PATCH] D139974: [llvm] Change llvm::Any to wrap std::any

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 13 14:55:00 PST 2022


sebastian-ne created this revision.
sebastian-ne added reviewers: jloser, MaskRay, dblaikie, jsilvanus.
Herald added a subscriber: StephenFan.
Herald added a project: All.
sebastian-ne requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

llvm::Any had and has several bugs, so we eventually want to replace it
with std::any.

Unfortunately, we cannot do that right now because of bugs in the msvc
standard library.
This patch re-implements llvm::Any as a wrapper around std::any.
With non-msvc compilers or when the msvc version is new enough (the
issue was fixed in VS 2022 17.4) we use std::any internally. On other
versions we fall back to our existing implementation of llvm::Any.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D139974

Files:
  llvm/include/llvm/ADT/Any.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139974.482636.patch
Type: text/x-patch
Size: 3826 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221213/9202c904/attachment.bin>


More information about the llvm-commits mailing list