Hi,
while introducing support for MinVersionLoadCommand in llvm-readobj I noticed there's no API to extract Major/Minor/Update components conveniently. Currently consumers do the bit twiddling on their own. I think this level of coupling is not necessary. Consumers shouldn't be aware of how version is represented. So, I propose to introduce the following API. I think it can be extended introducing another argument IsSDK (or, simply SDK) so that we can retrieve SDK version components easily as well, without introducing new functions. Comments welcome.
Details
Details
- Reviewers
grosbach • rafael - Commits
- rG933e23073874: [MachO] Introduce MinVersion API.
Diff Detail
Diff Detail
Event Timeline
Comment Actions
Would it be better for these function to be in the header since they're trivial accessors?
Comment Actions
Sure. I want to point out that large part of the functions in
MachOObjectFile.cpp can be static'ized and moved to the header as they
are very similar to these one.
If nobody else takes care of this task -- I'll audit them and fix once
I'm done with macho-dump removal.
These can be static, no?