Record the definition of a value and check for duplicate definitions.
(&mut self, value: Value, def: ValueDef)
| 157 | |
| 158 | /// Record the definition of a value and check for duplicate definitions. |
| 159 | fn check_value_def(&mut self, value: Value, def: ValueDef) -> Result<()> { |
| 160 | match self.value_defs[value] { |
| 161 | Some(_) => bail!("{value} defined multiple times"), |
| 162 | ref mut opt @ None => *opt = Some(def), |
| 163 | } |
| 164 | Ok(()) |
| 165 | } |
| 166 | |
| 167 | /// Check for multiple conflicting uses of a fixed register in a single |
| 168 | /// constraint scope. |
no outgoing calls
no test coverage detected