Skip to content

Commit

Permalink
Linker: teach the IR mover to return llvm::Error.
Browse files Browse the repository at this point in the history
This will be needed in order to consistently return an Error
to clients of the API being developed in D20268.

Differential Revision: http://reviews.llvm.org/D20550

llvm-svn: 270967
  • Loading branch information
pcc committed May 27, 2016
1 parent 8ef190c commit 1eaa97f
Show file tree
Hide file tree
Showing 9 changed files with 128 additions and 117 deletions.
7 changes: 3 additions & 4 deletions llvm/include/llvm/Linker/IRMover.h
Expand Up @@ -15,6 +15,7 @@
#include <functional>

namespace llvm {
class Error;
class GlobalValue;
class Metadata;
class Module;
Expand Down Expand Up @@ -70,10 +71,8 @@ class IRMover {
/// not present in ValuesToLink. The GlobalValue and a ValueAdder callback
/// are passed as an argument, and the callback is expected to be called
/// if the GlobalValue needs to be added to the \p ValuesToLink and linked.
///
/// Returns true on error.
bool move(std::unique_ptr<Module> Src, ArrayRef<GlobalValue *> ValuesToLink,
std::function<void(GlobalValue &GV, ValueAdder Add)> AddLazyFor);
Error move(std::unique_ptr<Module> Src, ArrayRef<GlobalValue *> ValuesToLink,
std::function<void(GlobalValue &GV, ValueAdder Add)> AddLazyFor);
Module &getModule() { return Composite; }

private:
Expand Down

0 comments on commit 1eaa97f

Please sign in to comment.