From 0c8c36de36b8877b0a78f04cc0702ab74fe43178 Mon Sep 17 00:00:00 2001 From: Peter Collingbourne Date: Fri, 23 Sep 2016 21:43:51 +0000 Subject: [PATCH] Update clang for r282299. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@282301 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/BackendUtil.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/lib/CodeGen/BackendUtil.cpp b/lib/CodeGen/BackendUtil.cpp index 541e676be202..b3e54cf442f2 100644 --- a/lib/CodeGen/BackendUtil.cpp +++ b/lib/CodeGen/BackendUtil.cpp @@ -714,20 +714,6 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, } } -namespace { -// Wrapper prodiving a stream for the ThinLTO backend. -class ThinLTOOutputWrapper : public lto::NativeObjectOutput { - std::unique_ptr OS; - -public: - ThinLTOOutputWrapper(std::unique_ptr OS) - : OS(std::move(OS)) {} - std::unique_ptr getStream() override { - return std::move(OS); - } -}; -} - static void runThinLTOBackend(const CodeGenOptions &CGOpts, Module *M, std::unique_ptr OS) { // If we are performing a ThinLTO importing compile, load the function index @@ -769,12 +755,12 @@ static void runThinLTOBackend(const CodeGenOptions &CGOpts, Module *M, ModuleMap[I.first()] = (*MBOrErr)->getMemBufferRef(); OwnedImports.push_back(std::move(*MBOrErr)); } - auto AddOutput = [&](size_t Task) { - return llvm::make_unique(std::move(OS)); + auto AddStream = [&](size_t Task) { + return llvm::make_unique(std::move(OS)); }; lto::Config Conf; if (Error E = thinBackend( - Conf, 0, AddOutput, *M, *CombinedIndex, ImportList, + Conf, 0, AddStream, *M, *CombinedIndex, ImportList, ModuleToDefinedGVSummaries[M->getModuleIdentifier()], ModuleMap)) { handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { errs() << "Error running ThinLTO backend: " << EIB.message() << '\n';