summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-08-22 16:17:40 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-08-22 16:17:40 +0000
commitf8c2f08cb361c522f7bb614220e78bc9f77724a9 (patch)
tree28fba68a22c572f0c9d3a5582458afb706a8af3e /llvm/lib
parent673b347e5a4aa8ca382dfb38e0cc3e9ead6c68fe (diff)
downloadbcm5719-llvm-f8c2f08cb361c522f7bb614220e78bc9f77724a9.tar.gz
bcm5719-llvm-f8c2f08cb361c522f7bb614220e78bc9f77724a9.zip
[LTO] Constify the Module Hook function (NFC)
It use to be non-const for the sole purpose of custom handling of commons symbol. This is moved now in the regular LTO handling now and such we can constify the callback. llvm-svn: 279438
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTOBackend.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp
index a89364e46a0..732f35a56b2 100644
--- a/llvm/lib/LTO/LTOBackend.cpp
+++ b/llvm/lib/LTO/LTOBackend.cpp
@@ -47,7 +47,7 @@ Error Config::addSaveTemps(std::string OutputFileName,
auto setHook = [&](std::string PathSuffix, ModuleHookFn &Hook) {
// Keep track of the hook provided by the linker, which also needs to run.
ModuleHookFn LinkerHook = Hook;
- Hook = [=](unsigned Task, Module &M) {
+ Hook = [=](unsigned Task, const Module &M) {
// If the linker's hook returned false, we need to pass that result
// through.
if (LinkerHook && !LinkerHook(Task, M))
OpenPOWER on IntegriCloud