[PATCH] D64006: [Support] Support 64-bit offsets in DataExtractor.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 1 22:08:13 PDT 2019
ikudrin added a comment.
Initially, I tried to replace `uint32_t` offsets to `uint64_t`. Unfortunately, that is not as mechanical, as you might expect. Please look at D64059 <https://reviews.llvm.org/D64059>, which is my current progress with that approach. It is far to be complete and it is already overwhelmingly complex.
I identified several problems with that approach:
- You have to find all the places where offsets are printed and decide the correct specifiers. It is not hard to overlook some.
- Sometimes the values are not passed by pointers, so the compiler helps little to find that places.
- As sometimes the offsets are calculated from several values, you have to dig deeper to decide which should be switched to `uint64_t` and which should not. That is really not a mechanical work, too.
- Some clients just don't need 64-bit offsets, at least for now. But with that approach, they have to be updated as well, further increasing the complexity.
Comparing all that with a subtle chance to misuse an overloaded method, I'd prefer to move at a slow pace, but with patches which at least might be understandable.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64006/new/
https://reviews.llvm.org/D64006
More information about the llvm-commits
mailing list