diff options
| author | Pete Cooper <peter_cooper@apple.com> | 2016-08-11 18:41:14 +0000 |
|---|---|---|
| committer | Pete Cooper <peter_cooper@apple.com> | 2016-08-11 18:41:14 +0000 |
| commit | 932bce6ade232aebfa91ac03be2b47563e8c4a8a (patch) | |
| tree | 0b212a24e0e024e30bb94c29ff3f89ef793152fd | |
| parent | 35fef211a04abeabb0f4e3b6a80a5bad8ec7f093 (diff) | |
| download | bcm5719-llvm-932bce6ade232aebfa91ac03be2b47563e8c4a8a.tar.gz bcm5719-llvm-932bce6ade232aebfa91ac03be2b47563e8c4a8a.zip | |
Fix off-by-one error in default currentVersion.
A version of 0x1000 is 0.16.0, not 1.0.0 as the comment said. Fix the
value to match the comment, and also the one test case which had this
wrong.
llvm-svn: 278381
| -rw-r--r-- | lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp | 4 | ||||
| -rw-r--r-- | lld/test/mach-o/dylib-install-names.yaml | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp index 05375f145d3..ebd4bf3abf9 100644 --- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp +++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp @@ -734,7 +734,7 @@ uint32_t MachOLinkingContext::dylibCurrentVersion(StringRef installName) const { if (pos != _pathToDylibMap.end()) return pos->second->currentVersion(); else - return 0x1000; // 1.0 + return 0x10000; // 1.0 } uint32_t MachOLinkingContext::dylibCompatVersion(StringRef installName) const { @@ -742,7 +742,7 @@ uint32_t MachOLinkingContext::dylibCompatVersion(StringRef installName) const { if (pos != _pathToDylibMap.end()) return pos->second->compatVersion(); else - return 0x1000; // 1.0 + return 0x10000; // 1.0 } void MachOLinkingContext::createImplicitFiles( diff --git a/lld/test/mach-o/dylib-install-names.yaml b/lld/test/mach-o/dylib-install-names.yaml index a5a801cde68..af00adfd590 100644 --- a/lld/test/mach-o/dylib-install-names.yaml +++ b/lld/test/mach-o/dylib-install-names.yaml @@ -63,8 +63,8 @@ global-symbols: # CHECK-BINARY-READ-NEXT: cmdsize 56 # CHECK-BINARY-READ-NEXT: name /usr/lib/libSystem.B.dylib (offset 24) # CHECK-BINARY-READ-NEXT: time stamp 2 -# CHECK-BINARY-READ-NEXT: current version 0.16.0 -# CHECK-BINARY-READ-NEXT: compatibility version 0.16.0 +# CHECK-BINARY-READ-NEXT: current version 1.0.0 +# CHECK-BINARY-READ-NEXT: compatibility version 1.0.0 # CHECK-BINARY-READ: cmd LC_LOAD_DYLIB # CHECK-BINARY-READ-NEXT: cmdsize 40 |

