r282301 - Update clang for r282299.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 23 14:43:51 PDT 2016


Author: pcc
Date: Fri Sep 23 16:43:51 2016
New Revision: 282301

URL: http://llvm.org/viewvc/llvm-project?rev=282301&view=rev
Log:
Update clang for r282299.

Modified:
    cfe/trunk/lib/CodeGen/BackendUtil.cpp

Modified: cfe/trunk/lib/CodeGen/BackendUtil.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/BackendUtil.cpp?rev=282301&r1=282300&r2=282301&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/BackendUtil.cpp (original)
+++ cfe/trunk/lib/CodeGen/BackendUtil.cpp Fri Sep 23 16:43:51 2016
@@ -714,20 +714,6 @@ void EmitAssemblyHelper::EmitAssembly(Ba
   }
 }
 
-namespace {
-// Wrapper prodiving a stream for the ThinLTO backend.
-class ThinLTOOutputWrapper : public lto::NativeObjectOutput {
-  std::unique_ptr<raw_pwrite_stream> OS;
-
-public:
-  ThinLTOOutputWrapper(std::unique_ptr<raw_pwrite_stream> OS)
-      : OS(std::move(OS)) {}
-  std::unique_ptr<raw_pwrite_stream> getStream() override {
-    return std::move(OS);
-  }
-};
-}
-
 static void runThinLTOBackend(const CodeGenOptions &CGOpts, Module *M,
                               std::unique_ptr<raw_pwrite_stream> OS) {
   // If we are performing a ThinLTO importing compile, load the function index
@@ -769,12 +755,12 @@ static void runThinLTOBackend(const Code
     ModuleMap[I.first()] = (*MBOrErr)->getMemBufferRef();
     OwnedImports.push_back(std::move(*MBOrErr));
   }
-  auto AddOutput = [&](size_t Task) {
-    return llvm::make_unique<ThinLTOOutputWrapper>(std::move(OS));
+  auto AddStream = [&](size_t Task) {
+    return llvm::make_unique<lto::NativeObjectStream>(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';




More information about the cfe-commits mailing list