mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 01:07:04 +08:00
Currently the bindings only allow for parsing IR with a top-level `builtin.module` op, since the parse APIs insert an implicit module op. This change adds `Operation.parse`, which returns whatever top-level op is actually in the source. To simplify parsing of specific operations, `OpView.parse` is also added, which handles the error checking for `OpView` subclasses. Reviewed By: ftynse, stellaraccident Differential Revision: https://reviews.llvm.org/D143352
4.4 KiB
4.4 KiB