[PATCH] D134250: [ObjectYAML] Support chained fixups, dyld exports trie, data in code

Xing GUO via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 03:31:57 PDT 2022


Higuoxing added inline comments.


================
Comment at: llvm/tools/obj2yaml/macho2yaml.cpp:673
+    MachO::data_in_code_entry DICE = Obj.getDataInCodeTableEntry(DIC.dataoff, Idx);
+    uint8_t *Bytes = static_cast<uint8_t *>(static_cast<void *>(&DICE));
+    for (size_t Jdx = 0; Jdx < sizeof(MachO::data_in_code_entry); Jdx++) {
----------------
beanz wrote:
> Higuoxing wrote:
> > Why not using `reinterpret_case<>` here?
> `void*` to `uint8_t*` doesn’t need a `reinterpret_cast` so it is better to use a `static_cast`.
Yes, I mean why not just

```
uint8_t *Bytes = reinterpret_cast<uint8_t *>(&DICE);
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134250/new/

https://reviews.llvm.org/D134250



More information about the llvm-commits mailing list