Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expose InstKind::FromInt for Inst instead of InstKind::Make
The Inst type will type erase a specific typed instruction by storing the kind as an integer. It does this by calling InstKind::AsInt on a runtime or compile-time InstKind. Then it returns the kind as InstKind by reconstituting it from the integer. Currently it does a cast to a raw enumerator and then calls InstKind::Make. However Make is designed to be more of an internal detail. The more clearly paired inverse operation is InstKind::FromInt, which is documented as being intended to be exposed by derived classes like InstKind.
- Loading branch information