Declare an anonymous data object in this module.
(&mut self, writable: bool, tls: bool)
| 810 | |
| 811 | /// Declare an anonymous data object in this module. |
| 812 | pub fn declare_anonymous_data(&mut self, writable: bool, tls: bool) -> ModuleResult<DataId> { |
| 813 | let id = self.data_objects.push(DataDeclaration { |
| 814 | name: None, |
| 815 | linkage: Linkage::Local, |
| 816 | writable, |
| 817 | tls, |
| 818 | }); |
| 819 | Ok(id) |
| 820 | } |
| 821 | } |
| 822 | |
| 823 | /// A `Module` is a utility for collecting functions and data objects, and linking them together. |