Appends the specified amount of bytes of padding into the text section. This is only useful when fuzzing and/or debugging cranelift itself and for production scenarios `padding` is 0 and this function does nothing.
(&mut self, padding: usize)
| 206 | /// This is only useful when fuzzing and/or debugging cranelift itself and |
| 207 | /// for production scenarios `padding` is 0 and this function does nothing. |
| 208 | pub fn append_padding(&mut self, padding: usize) { |
| 209 | if padding == 0 { |
| 210 | return; |
| 211 | } |
| 212 | self.text |
| 213 | .append(false, &vec![0; padding], 1, &mut self.ctrl_plane); |
| 214 | } |
| 215 | |
| 216 | /// Indicates that the text section has been written completely and this |
| 217 | /// will finish appending it to the original object. |