Skip to content

Commit 1eaa97f

Browse files
committed
Linker: teach the IR mover to return llvm::Error.
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
1 parent 8ef190c commit 1eaa97f

File tree

9 files changed

+128
-117
lines changed

9 files changed

+128
-117
lines changed

llvm/include/llvm/Linker/IRMover.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include <functional>
1616

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

7978
private:

0 commit comments

Comments
 (0)