diff options
author | Pete Cooper <peter_cooper@apple.com> | 2016-03-30 20:36:31 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2016-03-30 20:36:31 +0000 |
commit | c73c9d273dfe5b12ae50cc5f1a6c7b763ee1a746 (patch) | |
tree | c05377d5ac3ff6c540ccf8dc6145b43e7ab257b1 /lld/include | |
parent | a5a63787001121ff30debe7afb59f23dc33e831e (diff) | |
download | bcm5719-llvm-c73c9d273dfe5b12ae50cc5f1a6c7b763ee1a746.tar.gz bcm5719-llvm-c73c9d273dfe5b12ae50cc5f1a6c7b763ee1a746.zip |
Convert lld Pass::runOnFile to llvm::Error from std::error_code. NFC.
Pretty mechanical change here. Just replacing all the std::error_code() with
llvm::Error() and make_dynamic_error_code with make_error<GenericError>
llvm-svn: 264917
Diffstat (limited to 'lld/include')
-rw-r--r-- | lld/include/lld/Core/Pass.h | 3 | ||||
-rw-r--r-- | lld/include/lld/Core/PassManager.h | 7 |
2 files changed, 6 insertions, 4 deletions
diff --git a/lld/include/lld/Core/Pass.h b/lld/include/lld/Core/Pass.h index da62e23394c..0527f02cd36 100644 --- a/lld/include/lld/Core/Pass.h +++ b/lld/include/lld/Core/Pass.h @@ -13,6 +13,7 @@ #include "lld/Core/Atom.h" #include "lld/Core/File.h" #include "lld/Core/Reference.h" +#include "llvm/Support/Error.h" #include <vector> namespace lld { @@ -33,7 +34,7 @@ public: virtual ~Pass() { } /// Do the actual work of the Pass. - virtual std::error_code perform(SimpleFile &mergedFile) = 0; + virtual llvm::Error perform(SimpleFile &mergedFile) = 0; protected: // Only subclassess can be instantiated. diff --git a/lld/include/lld/Core/PassManager.h b/lld/include/lld/Core/PassManager.h index 62aa119f8f7..71a25cc7f3c 100644 --- a/lld/include/lld/Core/PassManager.h +++ b/lld/include/lld/Core/PassManager.h @@ -12,6 +12,7 @@ #include "lld/Core/LLVM.h" #include "lld/Core/Pass.h" +#include "llvm/Support/Error.h" #include <memory> #include <vector> @@ -31,11 +32,11 @@ public: _passes.push_back(std::move(pass)); } - std::error_code runOnFile(SimpleFile &file) { + llvm::Error runOnFile(SimpleFile &file) { for (std::unique_ptr<Pass> &pass : _passes) - if (std::error_code EC = pass->perform(file)) + if (llvm::Error EC = pass->perform(file)) return EC; - return std::error_code(); + return llvm::Error(); } private: |