aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lld/MachO/DriverUtils.cpp')
-rw-r--r--lld/MachO/DriverUtils.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/lld/MachO/DriverUtils.cpp b/lld/MachO/DriverUtils.cpp
index 77f76b522d7e..9c09ff682286 100644
--- a/lld/MachO/DriverUtils.cpp
+++ b/lld/MachO/DriverUtils.cpp
@@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
#include "Driver.h"
+#include "Config.h"
#include "InputFiles.h"
#include "lld/Common/Args.h"
@@ -185,3 +186,10 @@ uint32_t macho::getModTime(StringRef path) {
warn("failed to get modification time of " + path);
return 0;
}
+
+void macho::printWhyLoad(StringRef reason, const InputFile *f) {
+ if (!config->printWhyLoad)
+ return;
+ lld::outs() << reason << " forced load of " << toString(f)
+ << '\n';
+}