From: Rafael Espindola Date: Mon, 13 Jan 2014 18:31:09 +0000 (+0000) Subject: Update for getLazyBitcodeModule API change. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b6c90f56688749159bcf3624e43aeb72f781fde8;p=clang Update for getLazyBitcodeModule API change. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199126 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CodeGenAction.cpp b/lib/CodeGen/CodeGenAction.cpp index d4f3b8db95..ef44c96bb6 100644 --- a/lib/CodeGen/CodeGenAction.cpp +++ b/lib/CodeGen/CodeGenAction.cpp @@ -354,12 +354,14 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, return 0; } - LinkModuleToUse = getLazyBitcodeModule(BCBuf, *VMContext, &ErrorStr); - if (!LinkModuleToUse) { + ErrorOr ModuleOrErr = + getLazyBitcodeModule(BCBuf, *VMContext); + if (error_code EC = ModuleOrErr.getError()) { CI.getDiagnostics().Report(diag::err_cannot_open_file) - << LinkBCFile << ErrorStr; + << LinkBCFile << EC.message(); return 0; } + LinkModuleToUse = ModuleOrErr.get(); } BEConsumer =