summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2013-09-24 23:26:34 +0000
committerRui Ueyama <ruiu@google.com>2013-09-24 23:26:34 +0000
commit8db1eddc072cb606f24689f8e0a438a44ee6aa4d (patch)
treea1875b513666422131a6b38ee80aab71d13bd27c /lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
parent3ce27103d9f95ade2a426d90d7639c4bf6fd96c3 (diff)
downloadbcm5719-llvm-8db1eddc072cb606f24689f8e0a438a44ee6aa4d.tar.gz
bcm5719-llvm-8db1eddc072cb606f24689f8e0a438a44ee6aa4d.zip
Make Driver::link and LinkingContext::validate return true on success.
This patch inverts the return value of these functions, so that they return "true" on success and "false" on failure. The meaning of boolean return value was mixed in LLD; for example, InputGraph::validate() returns true on success. With this patch they'll become consistent. CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D1748 llvm-svn: 191341
Diffstat (limited to 'lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp')
-rw-r--r--lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
index 39996f47ed4..b8f7b4e55d9 100644
--- a/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
+++ b/lld/lib/ReaderWriter/MachO/MachOLinkingContext.cpp
@@ -207,28 +207,28 @@ bool MachOLinkingContext::validateImpl(raw_ostream &diagnostics) {
if (_currentVersion && _outputFileType != mach_o::MH_DYLIB) {
diagnostics << "error: -current_version can only be used with dylibs\n";
- return true;
+ return false;
}
if (_compatibilityVersion && _outputFileType != mach_o::MH_DYLIB) {
diagnostics
<< "error: -compatibility_version can only be used with dylibs\n";
- return true;
+ return false;
}
if (_deadStrippableDylib && _outputFileType != mach_o::MH_DYLIB) {
diagnostics
<< "error: -mark_dead_strippable_dylib can only be used with dylibs.\n";
- return true;
+ return false;
}
if (!_bundleLoader.empty() && outputFileType() != mach_o::MH_BUNDLE) {
diagnostics
<< "error: -bundle_loader can only be used with Mach-O bundles\n";
- return true;
+ return false;
}
- return false;
+ return true;
}
bool MachOLinkingContext::setOS(OS os, StringRef minOSVersion) {
OpenPOWER on IntegriCloud