Determine if `v` is an attached instruction result / block parameter. An attached value can't be attached to something else without first being detached. Value aliases are not considered to be attached to anything. Use `resolve_aliases()` to determine if the original aliased value is attached.
(&self, v: Value)
| 418 | /// Value aliases are not considered to be attached to anything. Use `resolve_aliases()` to |
| 419 | /// determine if the original aliased value is attached. |
| 420 | pub fn value_is_attached(&self, v: Value) -> bool { |
| 421 | use self::ValueData::*; |
| 422 | match ValueData::from(self.values[v]) { |
| 423 | Inst { inst, num, .. } => Some(&v) == self.inst_results(inst).get(num as usize), |
| 424 | Param { block, num, .. } => Some(&v) == self.block_params(block).get(num as usize), |
| 425 | Alias { .. } => false, |
| 426 | Union { .. } => false, |
| 427 | } |
| 428 | } |
| 429 | |
| 430 | /// Resolve value aliases. |
| 431 | /// |
no test coverage detected