diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-09 17:49:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-11-09 17:49:19 +0000 |
commit | 76c218e0944189a0c16fb38a6a3a74c6b930810e (patch) | |
tree | 955b1d9e34fdf7a66aabd2417200225ea179618e /lib/Linker | |
parent | 5d84a0761edf17e5fde97f200e525e066be54b78 (diff) |
Bitcode: Change the materializer interface to return llvm::Error.
Differential Revision: https://reviews.llvm.org/D26439
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@286382 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Linker')
-rw-r--r-- | lib/Linker/IRMover.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Linker/IRMover.cpp b/lib/Linker/IRMover.cpp index ad57134ec7f..3c58d54802d 100644 --- a/lib/Linker/IRMover.cpp +++ b/lib/Linker/IRMover.cpp @@ -963,8 +963,8 @@ Error IRLinker::linkFunctionBody(Function &Dst, Function &Src) { assert(Dst.isDeclaration() && !Src.isDeclaration()); // Materialize if needed. - if (std::error_code EC = Src.materialize()) - return errorCodeToError(EC); + if (Error Err = Src.materialize()) + return Err; // Link in the operands without remapping. if (Src.hasPrefixData()) @@ -1191,8 +1191,8 @@ static std::string mergeTriples(const Triple &SrcTriple, Error IRLinker::run() { // Ensure metadata materialized before value mapping. if (SrcM->getMaterializer()) - if (std::error_code EC = SrcM->getMaterializer()->materializeMetadata()) - return errorCodeToError(EC); + if (Error Err = SrcM->getMaterializer()->materializeMetadata()) + return Err; // Inherit the target data from the source module if the destination module // doesn't have one already. |