[llvm] r245963 - [MachO] Move trivial accessors to header.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 25 11:27:59 PDT 2015
Author: davide
Date: Tue Aug 25 13:27:59 2015
New Revision: 245963
URL: http://llvm.org/viewvc/llvm-project?rev=245963&view=rev
Log:
[MachO] Move trivial accessors to header.
Requested by: Jim Grosbach.
Modified:
llvm/trunk/include/llvm/Object/MachO.h
llvm/trunk/lib/Object/MachOObjectFile.cpp
Modified: llvm/trunk/include/llvm/Object/MachO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Object/MachO.h?rev=245963&r1=245962&r2=245963&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Object/MachO.h (original)
+++ llvm/trunk/include/llvm/Object/MachO.h Tue Aug 25 13:27:59 2015
@@ -344,12 +344,6 @@ public:
getLinkerOptionLoadCommand(const LoadCommandInfo &L) const;
MachO::version_min_command
getVersionMinLoadCommand(const LoadCommandInfo &L) const;
- static uint32_t
- getVersionMinMajor(MachO::version_min_command &C, bool SDK);
- static uint32_t
- getVersionMinMinor(MachO::version_min_command &C, bool SDK);
- static uint32_t
- getVersionMinUpdate(MachO::version_min_command &C, bool SDK);
MachO::dylib_command
getDylibIDLoadCommand(const LoadCommandInfo &L) const;
MachO::dyld_info_command
@@ -428,6 +422,24 @@ public:
return v->isMachO();
}
+ static uint32_t
+ getVersionMinMajor(MachO::version_min_command &C, bool SDK) {
+ uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
+ return (VersionOrSDK >> 16) & 0xffff;
+ }
+
+ static uint32_t
+ getVersionMinMinor(MachO::version_min_command &C, bool SDK) {
+ uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
+ return (VersionOrSDK >> 8) & 0xff;
+ }
+
+ static uint32_t
+ getVersionMinUpdate(MachO::version_min_command &C, bool SDK) {
+ uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
+ return VersionOrSDK & 0xff;
+ }
+
private:
uint64_t getSymbolValueImpl(DataRefImpl Symb) const override;
Modified: llvm/trunk/lib/Object/MachOObjectFile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/MachOObjectFile.cpp?rev=245963&r1=245962&r2=245963&view=diff
==============================================================================
--- llvm/trunk/lib/Object/MachOObjectFile.cpp (original)
+++ llvm/trunk/lib/Object/MachOObjectFile.cpp Tue Aug 25 13:27:59 2015
@@ -2001,24 +2001,6 @@ MachOObjectFile::getVersionMinLoadComman
return getStruct<MachO::version_min_command>(this, L.Ptr);
}
-uint32_t
-MachOObjectFile::getVersionMinMajor(MachO::version_min_command &C, bool SDK) {
- uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
- return (VersionOrSDK >> 16) & 0xffff;
-}
-
-uint32_t
-MachOObjectFile::getVersionMinMinor(MachO::version_min_command &C, bool SDK) {
- uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
- return (VersionOrSDK >> 8) & 0xff;
-}
-
-uint32_t
-MachOObjectFile::getVersionMinUpdate(MachO::version_min_command &C, bool SDK) {
- uint32_t VersionOrSDK = (SDK) ? C.sdk : C.version;
- return VersionOrSDK & 0xff;
-}
-
MachO::dylib_command
MachOObjectFile::getDylibIDLoadCommand(const LoadCommandInfo &L) const {
return getStruct<MachO::dylib_command>(this, L.Ptr);
More information about the llvm-commits
mailing list