r239859 - Update for llvm api change.

Rafael Espindola rafael.espindola at gmail.com
Tue Jun 16 15:32:44 PDT 2015


Author: rafael
Date: Tue Jun 16 17:32:44 2015
New Revision: 239859

URL: http://llvm.org/viewvc/llvm-project?rev=239859&view=rev
Log:
Update for llvm api change.

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

Modified: cfe/trunk/lib/CodeGen/CodeGenAction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenAction.cpp?rev=239859&r1=239858&r2=239859&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenAction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenAction.cpp Tue Jun 16 17:32:44 2015
@@ -649,14 +649,14 @@ CodeGenAction::CreateASTConsumer(Compile
       return nullptr;
     }
 
-    ErrorOr<llvm::Module *> ModuleOrErr =
+    ErrorOr<std::unique_ptr<llvm::Module>> ModuleOrErr =
         getLazyBitcodeModule(std::move(*BCBuf), *VMContext);
     if (std::error_code EC = ModuleOrErr.getError()) {
       CI.getDiagnostics().Report(diag::err_cannot_open_file)
         << LinkBCFile << EC.message();
       return nullptr;
     }
-    LinkModuleToUse = ModuleOrErr.get();
+    LinkModuleToUse = ModuleOrErr.get().release();
   }
 
   CoverageSourceInfo *CoverageInfo = nullptr;





More information about the cfe-commits mailing list