diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-13 18:31:09 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2014-01-13 18:31:09 +0000 |
commit | 6b6004a96ec3b1dd1692d36e597eb79fd61937c5 (patch) | |
tree | 8235124cb1d3952a0d99659cee7ab53e794eb589 /clang/lib/CodeGen/CodeGenAction.cpp | |
parent | 5b6c1e8e5935cb4ed07cb7faf217b828b1397340 (diff) | |
download | bcm5719-llvm-6b6004a96ec3b1dd1692d36e597eb79fd61937c5.tar.gz bcm5719-llvm-6b6004a96ec3b1dd1692d36e597eb79fd61937c5.zip |
Update for getLazyBitcodeModule API change.
llvm-svn: 199126
Diffstat (limited to 'clang/lib/CodeGen/CodeGenAction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenAction.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp index d4f3b8db955..ef44c96bb6b 100644 --- a/clang/lib/CodeGen/CodeGenAction.cpp +++ b/clang/lib/CodeGen/CodeGenAction.cpp @@ -354,12 +354,14 @@ ASTConsumer *CodeGenAction::CreateASTConsumer(CompilerInstance &CI, return 0; } - LinkModuleToUse = getLazyBitcodeModule(BCBuf, *VMContext, &ErrorStr); - if (!LinkModuleToUse) { + ErrorOr<llvm::Module *> 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 = |