[MachO] More missing swapStruct implementations

Added swapStruct for ident_command, fvmlib and fvmlib_command.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269514 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Bieneman 2016-05-13 23:01:22 +00:00
parent 9511418ec3
commit 5909d726a2

View File

@ -1270,6 +1270,23 @@ namespace llvm {
sys::swapByteOrder(C.size);
};
inline void swapStruct(ident_command &C) {
sys::swapByteOrder(C.cmd);
sys::swapByteOrder(C.cmdsize);
};
inline void swapStruct(fvmlib &C) {
sys::swapByteOrder(C.name);
sys::swapByteOrder(C.minor_version);
sys::swapByteOrder(C.header_addr);
};
inline void swapStruct(fvmlib_command &C) {
sys::swapByteOrder(C.cmd);
sys::swapByteOrder(C.cmdsize);
swapStruct(C.fvmlib);
};
// Get/Set functions from <mach-o/nlist.h>
static inline uint16_t GET_LIBRARY_ORDINAL(uint16_t n_desc) {