[PATCH] D48807: Add llvm::Any

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 3 11:15:19 PDT 2018


zturner added a comment.

To re-iterate a couple of other points mentioned earlier:

1. For a given event type and host platform there would usually (but not always) be one type per platform.  The not always is important, because it means a runtime discovery process is necessary in some cases.

2. There are multiple event types, so if you did have a virtual function accessible from the base class, it would need to decide on a single common type to return.  However, since there isn't a common type, you're ultimately just re-inventing `Any` without using `Any` by artificially injecting a base class that doesn't really do anything except satisfy the type system.

3. `Any` is in C++17, which LLVM will eventually adopt


https://reviews.llvm.org/D48807





More information about the llvm-commits mailing list