[PATCH] D13990: These are the matching changes needed to the lld project for the changes to llvm that changed the Archive and Child interfaces in libObject.
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 24 17:27:19 PDT 2015
rafael added inline comments.
================
Comment at: COFF/DriverUtils.cpp:524
@@ -523,2 +523,3 @@
std::vector<NewArchiveIterator> V;
- for (const object::Archive::Child &C : Archive.children()) {
+ for (auto &ChildOrErr : Archive.children()) {
+ error(ChildOrErr, "Archive::Child::getName failed");
----------------
can it be "const auto &"
================
Comment at: ELF/InputFiles.cpp:255
@@ -254,1 +254,3 @@
Archive::child_iterator It = *ItOrErr;
+ if (std::error_code EC = It->getError())
+ error(EC, "Could not get the member for defining symbol " + Sym->getName());
----------------
You can write this as
ErrorOr<Child> &ChildOrErr = *It;
erorr(ChildOrErr, ...)
no?
http://reviews.llvm.org/D13990
More information about the llvm-commits
mailing list