From: Peter Collingbourne Date: Fri, 23 Sep 2016 21:43:51 +0000 (+0000) Subject: Update clang for r282299. X-Git-Tag: llvmorg-4.0.0-rc1~9018 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2d3a26ffb98a65553c33935656bf6bc95953f1a4;p=platform%2Fupstream%2Fllvm.git Update clang for r282299. llvm-svn: 282301 --- diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 541e676..b3e54cf 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/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';