Allocate a new signature.
(
&mut self,
sig: SigRef,
data: Signature,
loc: Location,
defaultcc: CallConv,
)
| 347 | |
| 348 | // Allocate a new signature. |
| 349 | fn add_sig( |
| 350 | &mut self, |
| 351 | sig: SigRef, |
| 352 | data: Signature, |
| 353 | loc: Location, |
| 354 | defaultcc: CallConv, |
| 355 | ) -> ParseResult<()> { |
| 356 | self.map.def_sig(sig, loc)?; |
| 357 | while self.function.dfg.signatures.next_key().index() <= sig.index() { |
| 358 | self.function.import_signature(Signature::new(defaultcc)); |
| 359 | } |
| 360 | self.function.dfg.signatures[sig] = data; |
| 361 | Ok(()) |
| 362 | } |
| 363 | |
| 364 | // Resolve a reference to a signature. |
| 365 | fn check_sig(&self, sig: SigRef, loc: Location) -> ParseResult<()> { |
no test coverage detected