@@ -301,7 +301,7 @@ void MachOWriter::writeSymbolTable() {
301
301
O.LoadCommands [*O.SymTabCommandIndex ]
302
302
.MachOLoadCommand .symtab_command_data ;
303
303
304
- char *SymTable = ( char *) Buf->getBufferStart () + SymTabCommand.symoff ;
304
+ char *SymTable = Buf->getBufferStart () + SymTabCommand.symoff ;
305
305
for (auto &Symbol : O.SymTable .Symbols ) {
306
306
SymbolEntry *Sym = Symbol.get ();
307
307
uint32_t Nstrx = LayoutBuilder.getStringTableBuilder ().getOffset (Sym->Name );
@@ -319,7 +319,7 @@ void MachOWriter::writeRebaseInfo() {
319
319
const MachO::dyld_info_command &DyLdInfoCommand =
320
320
O.LoadCommands [*O.DyLdInfoCommandIndex ]
321
321
.MachOLoadCommand .dyld_info_command_data ;
322
- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.rebase_off ;
322
+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.rebase_off ;
323
323
assert ((DyLdInfoCommand.rebase_size == O.Rebases .Opcodes .size ()) &&
324
324
" Incorrect rebase opcodes size" );
325
325
memcpy (Out, O.Rebases .Opcodes .data (), O.Rebases .Opcodes .size ());
@@ -331,7 +331,7 @@ void MachOWriter::writeBindInfo() {
331
331
const MachO::dyld_info_command &DyLdInfoCommand =
332
332
O.LoadCommands [*O.DyLdInfoCommandIndex ]
333
333
.MachOLoadCommand .dyld_info_command_data ;
334
- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.bind_off ;
334
+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.bind_off ;
335
335
assert ((DyLdInfoCommand.bind_size == O.Binds .Opcodes .size ()) &&
336
336
" Incorrect bind opcodes size" );
337
337
memcpy (Out, O.Binds .Opcodes .data (), O.Binds .Opcodes .size ());
@@ -343,7 +343,7 @@ void MachOWriter::writeWeakBindInfo() {
343
343
const MachO::dyld_info_command &DyLdInfoCommand =
344
344
O.LoadCommands [*O.DyLdInfoCommandIndex ]
345
345
.MachOLoadCommand .dyld_info_command_data ;
346
- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.weak_bind_off ;
346
+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.weak_bind_off ;
347
347
assert ((DyLdInfoCommand.weak_bind_size == O.WeakBinds .Opcodes .size ()) &&
348
348
" Incorrect weak bind opcodes size" );
349
349
memcpy (Out, O.WeakBinds .Opcodes .data (), O.WeakBinds .Opcodes .size ());
@@ -355,7 +355,7 @@ void MachOWriter::writeLazyBindInfo() {
355
355
const MachO::dyld_info_command &DyLdInfoCommand =
356
356
O.LoadCommands [*O.DyLdInfoCommandIndex ]
357
357
.MachOLoadCommand .dyld_info_command_data ;
358
- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.lazy_bind_off ;
358
+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.lazy_bind_off ;
359
359
assert ((DyLdInfoCommand.lazy_bind_size == O.LazyBinds .Opcodes .size ()) &&
360
360
" Incorrect lazy bind opcodes size" );
361
361
memcpy (Out, O.LazyBinds .Opcodes .data (), O.LazyBinds .Opcodes .size ());
@@ -367,7 +367,7 @@ void MachOWriter::writeExportInfo() {
367
367
const MachO::dyld_info_command &DyLdInfoCommand =
368
368
O.LoadCommands [*O.DyLdInfoCommandIndex ]
369
369
.MachOLoadCommand .dyld_info_command_data ;
370
- char *Out = ( char *) Buf->getBufferStart () + DyLdInfoCommand.export_off ;
370
+ char *Out = Buf->getBufferStart () + DyLdInfoCommand.export_off ;
371
371
assert ((DyLdInfoCommand.export_size == O.Exports .Trie .size ()) &&
372
372
" Incorrect export trie size" );
373
373
memcpy (Out, O.Exports .Trie .data (), O.Exports .Trie .size ());
@@ -397,7 +397,7 @@ void MachOWriter::writeLinkData(std::optional<size_t> LCIndex,
397
397
return ;
398
398
const MachO::linkedit_data_command &LinkEditDataCommand =
399
399
O.LoadCommands [*LCIndex].MachOLoadCommand .linkedit_data_command_data ;
400
- char *Out = ( char *) Buf->getBufferStart () + LinkEditDataCommand.dataoff ;
400
+ char *Out = Buf->getBufferStart () + LinkEditDataCommand.dataoff ;
401
401
assert ((LinkEditDataCommand.datasize == LD.Data .size ()) &&
402
402
" Incorrect data size" );
403
403
memcpy (Out, LD.Data .data (), LD.Data .size ());
@@ -574,7 +574,7 @@ void MachOWriter::writeExportsTrieData() {
574
574
const MachO::linkedit_data_command &ExportsTrieCmd =
575
575
O.LoadCommands [*O.ExportsTrieCommandIndex ]
576
576
.MachOLoadCommand .linkedit_data_command_data ;
577
- char *Out = ( char *) Buf->getBufferStart () + ExportsTrieCmd.dataoff ;
577
+ char *Out = Buf->getBufferStart () + ExportsTrieCmd.dataoff ;
578
578
assert ((ExportsTrieCmd.datasize == O.Exports .Trie .size ()) &&
579
579
" Incorrect export trie size" );
580
580
memcpy (Out, O.Exports .Trie .data (), O.Exports .Trie .size ());
0 commit comments