From: Mehdi Amini Date: Mon, 22 Aug 2016 16:41:58 +0000 (+0000) Subject: Fix Gold Plugin after API change in the LTO API (constify callback type) X-Git-Tag: llvmorg-4.0.0-rc1~11758 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6ec233313ab2d6ee1493e0f026e0703563b915c9;p=platform%2Fupstream%2Fllvm.git Fix Gold Plugin after API change in the LTO API (constify callback type) llvm-svn: 279440 --- diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index ee2f3f3..070b984 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -727,11 +727,11 @@ static std::unique_ptr createLTO() { break; case options::OT_DISABLE: - Conf.PreOptModuleHook = [](size_t Task, Module &M) { return false; }; + Conf.PreOptModuleHook = [](size_t Task, const Module &M) { return false; }; break; case options::OT_BC_ONLY: - Conf.PostInternalizeModuleHook = [](size_t Task, Module &M) { + Conf.PostInternalizeModuleHook = [](size_t Task, const Module &M) { std::error_code EC; raw_fd_ostream OS(output_name, EC, sys::fs::OpenFlags::F_None); if (EC)