Run the verifier on the function. Also check that the dominator tree and control flow graph are consistent with the function. TODO: rename to "CLIF validate" or similar.
(&self, fisa: FOI)
| 250 | /// |
| 251 | /// TODO: rename to "CLIF validate" or similar. |
| 252 | pub fn verify<'a, FOI: Into<FlagsOrIsa<'a>>>(&self, fisa: FOI) -> VerifierResult<()> { |
| 253 | let mut errors = VerifierErrors::default(); |
| 254 | let _ = verify_context(&self.func, &self.cfg, &self.domtree, fisa, &mut errors); |
| 255 | |
| 256 | if errors.is_empty() { |
| 257 | Ok(()) |
| 258 | } else { |
| 259 | Err(errors) |
| 260 | } |
| 261 | } |
| 262 | |
| 263 | /// Run the verifier only if the `enable_verifier` setting is true. |
| 264 | pub fn verify_if<'a, FOI: Into<FlagsOrIsa<'a>>>(&self, fisa: FOI) -> CodegenResult<()> { |
no test coverage detected