[lld] r286561 - Make the Error class constructor protected
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 10 20:28:41 PST 2016
Author: mehdi_amini
Date: Thu Nov 10 22:28:40 2016
New Revision: 286561
URL: http://llvm.org/viewvc/llvm-project?rev=286561&view=rev
Log:
Make the Error class constructor protected
This is forcing to use Error::success(), which is in a wide majority
of cases a lot more readable.
Differential Revision: https://reviews.llvm.org/D26481
Modified:
lld/trunk/ELF/Driver.cpp
Modified: lld/trunk/ELF/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Driver.cpp?rev=286561&r1=286560&r2=286561&view=diff
==============================================================================
--- lld/trunk/ELF/Driver.cpp (original)
+++ lld/trunk/ELF/Driver.cpp Thu Nov 10 22:28:40 2016
@@ -102,7 +102,7 @@ LinkerDriver::getArchiveMembers(MemoryBu
check(Archive::create(MB), "failed to parse archive");
std::vector<MemoryBufferRef> V;
- Error Err;
+ Error Err = Error::success();
for (const ErrorOr<Archive::Child> &COrErr : File->children(Err)) {
Archive::Child C = check(COrErr, "could not get the child of the archive " +
File->getFileName());
More information about the llvm-commits
mailing list