diff options
| author | Rui Ueyama <ruiu@google.com> | 2016-01-29 01:54:52 +0000 |
|---|---|---|
| committer | Rui Ueyama <ruiu@google.com> | 2016-01-29 01:54:52 +0000 |
| commit | 1940424632328c9921abf328ede29cbc28f9680c (patch) | |
| tree | c3c01a5d3874ef36fd4ad936dca396dfe9e99f6f /lld/ELF/Error.cpp | |
| parent | 572a6f74a74a1dd668be4a2d00b29a2d50321d02 (diff) | |
| download | bcm5719-llvm-1940424632328c9921abf328ede29cbc28f9680c.tar.gz bcm5719-llvm-1940424632328c9921abf328ede29cbc28f9680c.zip | |
ELF: Report multiple errors from the driver.
This patch let the driver keep going until it parses all
command line options.
http://reviews.llvm.org/D16645
llvm-svn: 259143
Diffstat (limited to 'lld/ELF/Error.cpp')
| -rw-r--r-- | lld/ELF/Error.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/lld/ELF/Error.cpp b/lld/ELF/Error.cpp index 327bb26a4f1..e3add1b4068 100644 --- a/lld/ELF/Error.cpp +++ b/lld/ELF/Error.cpp @@ -24,14 +24,18 @@ void error(const Twine &Msg) { HasError = true; } -void error(std::error_code EC, const Twine &Prefix) { - if (EC) - error(Prefix + ": " + EC.message()); +bool error(std::error_code EC, const Twine &Prefix) { + if (!EC) + return false; + error(Prefix + ": " + EC.message()); + return true; } -void error(std::error_code EC) { - if (EC) - error(EC.message()); +bool error(std::error_code EC) { + if (!EC) + return false; + error(EC.message()); + return true; } void fatal(const Twine &Msg) { |

