diff --git a/pliron-llvm/src/llvm_sys/mod.rs b/pliron-llvm/src/llvm_sys/mod.rs index db97ccc..1e1afa7 100644 --- a/pliron-llvm/src/llvm_sys/mod.rs +++ b/pliron-llvm/src/llvm_sys/mod.rs @@ -6,6 +6,7 @@ //! checks that `phi_node` is indeed a C++ `PHINode`. //! 2. `core::llvm_count_param_types(ty: LLVMTypeRef)` //! checks that `ty` is a function type. +//! //! This ensures that there are no undefined behavior / invalid memory accesses. //! We do not check for invalid IR that is caught by the verifier. //! As a general guideline, ensure that the C-Types (which are C++ base classes) diff --git a/src/builtin/op_interfaces.rs b/src/builtin/op_interfaces.rs index 9a95b51..02b5fa7 100644 --- a/src/builtin/op_interfaces.rs +++ b/src/builtin/op_interfaces.rs @@ -389,7 +389,7 @@ decl_op_interface! { { let op = &*op.get_operation().deref(ctx); if op.get_num_operands() != 1 { - return verify_err!(op.loc(), ZeroOpdVerifyErr(op.get_opid().to_string())); + return verify_err!(op.loc(), OneOpdVerifyErr(op.get_opid().to_string())); } Ok(()) } diff --git a/src/graph/walkers.rs b/src/graph/walkers.rs index 745dc00..03cd16f 100644 --- a/src/graph/walkers.rs +++ b/src/graph/walkers.rs @@ -1,7 +1,10 @@ -//! Walk the IR graph. At each node: +//! Walk the IR graph. +//! +//! At each node: //! - Call a callback to process the node. //! - Walk over the children. -//! The relative orders of performing the above is configurable. +//! +//! The relative orders of performing the above is configurable. //! //! Throughout this module, only parent-child relations are considered, //! i.e., operations->regions, region->blocks and block->operations. diff --git a/src/irfmt/parsers.rs b/src/irfmt/parsers.rs index 6d39b36..24d8e5f 100644 --- a/src/irfmt/parsers.rs +++ b/src/irfmt/parsers.rs @@ -1,3 +1,5 @@ +//! Utilities for parsing. + use std::str::FromStr; use crate::{ @@ -21,11 +23,11 @@ use combine::{ /// Parse from `parser`, ignoring whitespace(s) before and after. /// > **Warning**: Do not use this inside inside repeating combiners, such as [combine::many]. -/// After successfully parsing one instance, if spaces are consumed to parse -/// the next one, but the next one doesn't exist, it is treated as a failure -/// that consumed some input. This messes things up. So spaces must be consumed -/// after a successfull parse, and not prior to an upcoming one. -/// A possibly right way to, for example, parse a comma separated list of [Identifier]s: +/// > After successfully parsing one instance, if spaces are consumed to parse +/// > the next one, but the next one doesn't exist, it is treated as a failure +/// > that consumed some input. This messes things up. So spaces must be consumed +/// > after a successfull parse, and not prior to an upcoming one. +/// > A possibly right way to, for example, parse a comma separated list of [Identifier]s: /// ///``` /// # use combine::{parser::char::spaces, Parser};