(&mut self, writable: bool, tls: bool)
| 415 | } |
| 416 | |
| 417 | fn declare_anonymous_data(&mut self, writable: bool, tls: bool) -> ModuleResult<DataId> { |
| 418 | let id = self.declarations.declare_anonymous_data(writable, tls)?; |
| 419 | |
| 420 | let kind = if tls { |
| 421 | SymbolKind::Tls |
| 422 | } else { |
| 423 | SymbolKind::Data |
| 424 | }; |
| 425 | |
| 426 | let symbol_id = self.object.add_symbol(Symbol { |
| 427 | name: self |
| 428 | .declarations |
| 429 | .get_data_decl(id) |
| 430 | .linkage_name(id) |
| 431 | .into_owned() |
| 432 | .into_bytes(), |
| 433 | value: 0, |
| 434 | size: 0, |
| 435 | kind, |
| 436 | scope: SymbolScope::Compilation, |
| 437 | weak: false, |
| 438 | section: SymbolSection::Undefined, |
| 439 | flags: SymbolFlags::None, |
| 440 | }); |
| 441 | self.data_objects[id] = Some((symbol_id, false)); |
| 442 | |
| 443 | Ok(id) |
| 444 | } |
| 445 | |
| 446 | fn define_function_with_control_plane( |
| 447 | &mut self, |
nothing calls this directly
no test coverage detected