Revision tags: llvmorg-4.0.1-rc2, llvmorg-4.0.1-rc1 |
|
#
d341c932 |
| 19-Apr-2017 |
Eugene Zelenko <eugene.zelenko@gmail.com> |
[Object] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 300779
|
Revision tags: llvmorg-4.0.0, llvmorg-4.0.0-rc4, llvmorg-4.0.0-rc3, llvmorg-4.0.0-rc2, llvmorg-4.0.0-rc1, llvmorg-3.9.1, llvmorg-3.9.1-rc3, llvmorg-3.9.1-rc2, llvmorg-3.9.1-rc1 |
|
#
41af4309 |
| 11-Nov-2016 |
Mehdi Amini <mehdi.amini@apple.com> |
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
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
llvm-svn: 286561
show more ...
|
#
bff47b51 |
| 24-Oct-2016 |
Pavel Labath <labath@google.com> |
[Object] Replace TimeValue with std::chrono
Summary: Most of the changes are very straight-forward. The only choice I had to make was to use second-precision time points in the Archive classes. I di
[Object] Replace TimeValue with std::chrono
Summary: Most of the changes are very straight-forward. The only choice I had to make was to use second-precision time points in the Archive classes. I did this because the archive files use that precision in the on-disk representation anyway.
Reviewers: rafael, zturner
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D25773
llvm-svn: 284974
show more ...
|
#
a5e873e2 |
| 05-Oct-2016 |
Lang Hames <lhames@gmail.com> |
[Object] Fix a crash in Archive::child_iterator's default constructor.
To be default constructible, Archive::child_iterator needs to be able to construct an Archive::Child with a null parent, howeve
[Object] Fix a crash in Archive::child_iterator's default constructor.
To be default constructible, Archive::child_iterator needs to be able to construct an Archive::Child with a null parent, however Archive::Child's constructor always dereferenced its Parent argument to compute the remaining archive size. This commit fixes Archive::Child's constructor to only do the size calculation when the parent is non-null.
llvm-svn: 283387
show more ...
|
#
14a5ca04 |
| 30-Sep-2016 |
Rui Ueyama <ruiu@google.com> |
[Object] Define Archive::isEmpty().
llvm-svn: 282884
|
Revision tags: llvmorg-3.9.0, llvmorg-3.9.0-rc3, llvmorg-3.9.0-rc2 |
|
#
2c182700 |
| 04-Aug-2016 |
Kevin Enderby <enderby@apple.com> |
Clean up the logic of the Archive::Child::Child() with an assert to know Err is not a nullptr when we are pointed at real data.
David Blaikie pointed out some odd logic in the case the Err value was
Clean up the logic of the Archive::Child::Child() with an assert to know Err is not a nullptr when we are pointed at real data.
David Blaikie pointed out some odd logic in the case the Err value was a nullptr and Lang Hames suggested it could be cleaned it up with an assert to know that Err is not a nullptr when we are pointed at real data. As only in the case of constructing the sentinel value by pointing it at null data is Err is permitted to be a nullptr, since no error could occur in that case.
With this change the testing for “if (Err)” is removed from the constructor’s logic and *Err is used directly without any check after the assert().
llvm-svn: 277776
show more ...
|
#
27e85bd0 |
| 03-Aug-2016 |
Kevin Enderby <enderby@apple.com> |
Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<> changing them to Expected<> to allow them to pass through llvm Errors. No functional change.
This commit by itsel
Clean up of libObject/Archive interfaces and change the last three uses of ErrorOr<> changing them to Expected<> to allow them to pass through llvm Errors. No functional change.
This commit by itself will break the next lld builds. I’ll be committing the matching change for lld immediately next.
llvm-svn: 277656
show more ...
|
#
4031d9f8 |
| 03-Aug-2016 |
Vedant Kumar <vsk@apple.com> |
Reapply "More fixes to get good error messages for bad archives."
This reverts commit the revert commit r277627. The build errors mentioned in r277627 were likely caused by an unclean build director
Reapply "More fixes to get good error messages for bad archives."
This reverts commit the revert commit r277627. The build errors mentioned in r277627 were likely caused by an unclean build directory. Sorry for the noise.
llvm-svn: 277630
show more ...
|
#
bfb6072d |
| 03-Aug-2016 |
Vedant Kumar <vsk@apple.com> |
Revert "More fixes to get good error messages for bad archives."
This reverts commit r277540. It breaks the build with:
../lib/Object/Archive.cpp:264:41: error: return type of out-of-line definitio
Revert "More fixes to get good error messages for bad archives."
This reverts commit r277540. It breaks the build with:
../lib/Object/Archive.cpp:264:41: error: return type of out-of-line definition of 'llvm::object::ArchiveMemberHeader::getUID' differs from that in the declaration Expected<unsigned> ArchiveMemberHeader::getUID() const { ~~~~~~~~~~~~~~~~~~ ^ include/llvm/Object/Archive.h:53:12: note: previous declaration is here unsigned getUID() const; ~~~~~~~~ ^
llvm-svn: 277627
show more ...
|
#
395cc094 |
| 02-Aug-2016 |
Kevin Enderby <enderby@apple.com> |
More fixes to get good error messages for bad archives.
Fixed the last incorrect uses of llvm_unreachable() in the code which were actually just cases of errors in the input Archives.
llvm-svn: 277
More fixes to get good error messages for bad archives.
Fixed the last incorrect uses of llvm_unreachable() in the code which were actually just cases of errors in the input Archives.
llvm-svn: 277540
show more ...
|
#
cd842ecc |
| 01-Aug-2016 |
David Blaikie <dblaikie@gmail.com> |
Simplify some code found when it was moved in r277177
llvm-svn: 277394
|
#
31b07f14 |
| 29-Jul-2016 |
Kevin Enderby <enderby@apple.com> |
Think this will fix issues with the error messages generated for malformed-archives.test in r277177 and added back this test which was deleted in r277196 while I tracked down these problems.
Changed
Think this will fix issues with the error messages generated for malformed-archives.test in r277177 and added back this test which was deleted in r277196 while I tracked down these problems.
Changed from constructing Twine's to std::string's as Twine's don't work across statements. Also removed a few unneeded Twine() constructions.
Fix the write_escaped() calls to not pass the unintended second argument fixing the warning on the ld-x86_64-win7 bot.
llvm-svn: 277223
show more ...
|
Revision tags: llvmorg-3.9.0-rc1 |
|
#
f4586039 |
| 29-Jul-2016 |
Kevin Enderby <enderby@apple.com> |
The next step along the way to getting good error messages for bad archives.
As mentioned in commit log for r276686 this next step is adding a new method in the ArchiveMemberHeader class to get the
The next step along the way to getting good error messages for bad archives.
As mentioned in commit log for r276686 this next step is adding a new method in the ArchiveMemberHeader class to get the full name that does proper error checking, and can be use for error messages.
To do this the name of ArchiveMemberHeader::getName() is changed to ArchiveMemberHeader::getRawName() to be consistent with Archive::Child::getRawName(). Then the “new” method is the addition of a new implementation of ArchiveMemberHeader::getName() which gets the full name and provides proper error checking. Which is mostly a rewrite of what was Archive::Child::getName() and cleaning up incorrect uses of llvm_unreachable() in the code which were actually just cases of errors in the input Archives.
Then Archive::Child::getName() is changed to return Expected<> and use the new implementation of ArchiveMemberHeader::getName() .
Also needed to change Archive::getMemoryBufferRef() with these changes to return Expected<> as well to propagate Errors up. As well as changing Archive::isThinMember() to return Expected<> .
llvm-svn: 277177
show more ...
|
#
95b0842e |
| 25-Jul-2016 |
Kevin Enderby <enderby@apple.com> |
Next step along the way to getting good error messages for bad archives.
I consulted with Lang Hames on this work, and the goal was to add a bit of "where" in the archive the error occurred along wi
Next step along the way to getting good error messages for bad archives.
I consulted with Lang Hames on this work, and the goal was to add a bit of "where" in the archive the error occurred along with what the error was.
So this step changes ArchiveMemberHeader into a class with a pointer to the archive header and the parent archive. Which allows the methods in the ArchiveMemberHeader to determine which member the header is for to include that information in the error message.
For this first step the "where" is just the offset to the member in the archive. The next step will be a new method on ArchiveMemberHeader to get the full name, if possible, to be use in the error message. Which will now be possible as ArchiveMemberHeader contains a pointer to the Archive with its string table and its size, etc. so the full name can be determined from the header if it is valid.
Also this change adds the missing checks the archive header is actually contained in the buffer and is not truncated, as well as if the terminating characters are correct in the header.
And changes one error message in Archive::Child::getNext() where the name or offset to member is now added.
llvm-svn: 276686
show more ...
|
#
5e51a2e3 |
| 22-Jul-2016 |
Lang Hames <lhames@gmail.com> |
[Support] Make ErrorAsOutParameter take an Error* rather than an Error&.
This allows ErrorAsOutParameter to work better with "optional" errors. For example, consider a function where for certain inp
[Support] Make ErrorAsOutParameter take an Error* rather than an Error&.
This allows ErrorAsOutParameter to work better with "optional" errors. For example, consider a function where for certain input values it is known that the function can't fail. This can now be written as:
Result foo(Arg X, Error *Err) { ErrorAsOutParameter EAO(Err);
if (<Error Condition>) { if (Err) *Err = <report error>; else llvm_unreachable("Unexpected failure!"); } }
Rather than having to construct an ErrorAsOutParameter under every conditional where Err is known to be non-null.
llvm-svn: 276430
show more ...
|
#
6524bd8c |
| 19-Jul-2016 |
Kevin Enderby <enderby@apple.com> |
Next step along the way to getting good error messages for bad archives.
This step builds on Lang Hames work to change Archive::child_iterator for better interoperation with Error/Expected. Buildin
Next step along the way to getting good error messages for bad archives.
This step builds on Lang Hames work to change Archive::child_iterator for better interoperation with Error/Expected. Building on that it is now possible to return an error message when the size field of an archive contains non-decimal characters.
llvm-svn: 276025
show more ...
|
#
69f4902b |
| 14-Jul-2016 |
Lang Hames <lhames@gmail.com> |
[Object] Change Archive::findSym to return an Expected<Optional<Child>>.
As suggested by Rafael in review of D22079 - this was accidentally left out of the final commit (r275316).
llvm-svn: 275469
|
#
fc209623 |
| 14-Jul-2016 |
Lang Hames <lhames@gmail.com> |
[Object] Re-apply r275316 now that I have the corresponding LLD patch ready.
llvm-svn: 275361
|
#
ae610ab5 |
| 14-Jul-2016 |
Lang Hames <lhames@gmail.com> |
[Object] Revert r275316, Archive::child_iterator changes, while I update lld.
Should fix the bots broken by r275316.
llvm-svn: 275353
|
#
c2773e97 |
| 13-Jul-2016 |
Lang Hames <lhames@gmail.com> |
[Object] Change Archive::child_iterator for better interop with Error/Expected.
See http://reviews.llvm.org/D22079
Changes the Archive::child_begin and Archive::children to require a reference to a
[Object] Change Archive::child_iterator for better interop with Error/Expected.
See http://reviews.llvm.org/D22079
Changes the Archive::child_begin and Archive::children to require a reference to an Error. If iterator increment fails (because the archive header is damaged) the iterator will be set to 'end()', and the error stored in the given Error&. The Error value should be checked by the user immediately after the loop. E.g.:
Error Err; for (auto &C : A->children(Err)) { // Do something with archive child C. } // Check the error immediately after the loop. if (Err) return Err;
Failure to check the Error will result in an abort() when the Error goes out of scope (as guaranteed by the Error class).
llvm-svn: 275316
show more ...
|
#
aecbdf70 |
| 05-Jul-2016 |
Saleem Abdulrasool <compnerd@compnerd.org> |
Object: support empty UID/GID fields
Normal archives do not have empty UID/GID fields. However, the Microsoft Import library format is a customized archive (it just uses an alternate symbol index f
Object: support empty UID/GID fields
Normal archives do not have empty UID/GID fields. However, the Microsoft Import library format is a customized archive (it just uses an alternate symbol index format). When the import library is constructed by lib.exe, the UID and GID fields are left empty. Do not abort on such an input.
llvm-svn: 274528
show more ...
|
#
c60a321c |
| 29-Jun-2016 |
Kevin Enderby <enderby@apple.com> |
Change Archive::create() from ErrorOr<...> to Expected<...> and update its clients.
This commit will break the next lld builds. I’ll be committing the matching change for lld next.
llvm-svn: 274160
|
#
cc371201 |
| 24-Jun-2016 |
Rafael Espindola <rafael.espindola@gmail.com> |
Make sure Format is always initialized.
Should fix the msan bots.
llvm-svn: 273679
|
#
ae108ffb |
| 17-Jun-2016 |
Kevin Enderby <enderby@apple.com> |
Add support for Darwin’s static library table of contents with 64-bit offsets to the archive members.
Darwin added support in its Xcode 8.0 tools (released in the beta) for static library table of c
Add support for Darwin’s static library table of contents with 64-bit offsets to the archive members.
Darwin added support in its Xcode 8.0 tools (released in the beta) for static library table of contents with 64-bit offsets to the archive members. The change is very straight forward. The table of contents member is named ___.SYMDEF_64 or "___.SYMDEF_64 SORTED" and same layout is used but with fields using 64 bit values instead of 32 bit values.
rdar://26869808
llvm-svn: 273058
show more ...
|
Revision tags: llvmorg-3.8.1, llvmorg-3.8.1-rc1 |
|
#
ac9e1555 |
| 17-May-2016 |
Kevin Enderby <enderby@apple.com> |
Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error when the object is in an archive to use something like libx.a(foo.o) as part of the error message.
Also changed llvm-ob
Change llvm-objdump, llvm-nm and llvm-size when reporting an object file error when the object is in an archive to use something like libx.a(foo.o) as part of the error message.
Also changed llvm-objdump and llvm-size to be like llvm-nm and ignore non-object files in archives and not produce any error message.
To do this Archive::Child::getAsBinary() was changed from ErrorOr<...> to Expected<...> then that was threaded up to its users.
Converting this interface to Expected<> from ErrorOr<> does involve touching a number of places. To contain the changes for now the use of errorToErrorCode() is still used in one place yet to be fully converted.
Again there some were bugs in the existing code that did not deal with the old ErrorOr<> return values. So now with Expected<> since they must be checked and the error handled, I added a TODO and a comments for those.
llvm-svn: 269784
show more ...
|