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 | b6c90f56688749159bcf3624e43aeb72f781fde8 (patch) | |
| tree | e45d1233cffa7d119ef7b90fd028cbbcfd00e0cf /lib/CodeGen/CodeGenAction.cpp | |
| parent | dd998561326361b249d20d02f642ed07515e6897 (diff) | |
| download | clang-b6c90f56688749159bcf3624e43aeb72f781fde8.tar.gz clang-b6c90f56688749159bcf3624e43aeb72f781fde8.tar.bz2 clang-b6c90f56688749159bcf3624e43aeb72f781fde8.tar.xz | |
Update for getLazyBitcodeModule API change.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@199126 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenAction.cpp')
| -rw-r--r-- | lib/CodeGen/CodeGenAction.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
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<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 = |
