summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/FileArchive.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Update for llvm api change.Rafael Espindola2014-06-231-1/+1
| | | | llvm-svn: 211548
* Update for llvm api change.Rafael Espindola2014-06-161-10/+12
| | | | llvm-svn: 211034
* Don't import error_code into the lld namespace.Rafael Espindola2014-06-121-17/+18
| | | | llvm-svn: 210785
* Fix a wrong comment.Rui Ueyama2014-06-041-31/+28
| | | | | | | | | | | Previously FileArchive ctor comment said that only its subclasses can be instantiated, but the ctor is actually public and is instantiated by ArchiveReader. Remove the wrong comment and reorder the member functions so that public members appear before private ones. llvm-svn: 210175
* Add a comment, fix style.Rui Ueyama2014-06-041-7/+6
| | | | llvm-svn: 210174
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-5/+5
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209948
* Add observers to Input GraphRui Ueyama2014-05-141-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | Make it possible to add observers to an Input Graph, so that files returned from an Input Graph can be examined before they are passed to Resolver. To implement some PE/COFF features we need to know all the symbols that *can* be solved, including ones in archive files that are not yet to be read. Currently, Resolver only maintains a set of symbols that are already read. It has no knowledge on symbols in skipped files in an archive file. There are many ways to implement that. I chose to apply the observer pattern here because it seems most non-intrusive. We don't want to mess up Resolver with architecture specific features. Even in PE/COFF, the feature that needs this mechanism is minor. So I chose not to modify Resolver, but add a hook to Input Graph. Differential Revision: http://reviews.llvm.org/D3735 llvm-svn: 208753
* Revert "temporary commit."Rui Ueyama2014-05-091-10/+0
| | | | | | This reverts accidental commit r208427. llvm-svn: 208433
* temporary commit.Rui Ueyama2014-05-091-0/+10
| | | | llvm-svn: 208427
* Remove "virtual" and add "override".Rui Ueyama2014-05-021-4/+4
| | | | llvm-svn: 207885
* Make the variable scope narrower. No functionality change.Rui Ueyama2014-05-021-5/+2
| | | | llvm-svn: 207821
* Fix comments.Rui Ueyama2014-04-031-1/+1
| | | | llvm-svn: 205568
* Replace OwningPtr with std::unique_ptr.Ahmed Charles2014-03-131-9/+8
| | | | | | | | This results in some simplifications to the code where an OwningPtr had to be used with the previous api and then ownership moved to a unique_ptr for the rest of lld. llvm-svn: 203809
* [Cleanup] Sort includes.Ahmed Charles2014-03-121-1/+1
| | | | llvm-svn: 203666
* Add "override" and remove "virtual" where appropriate.Rui Ueyama2014-03-061-8/+8
| | | | | | | For the record, I used clang-modernize to add "override" and perl to remove "virtual". llvm-svn: 203164
* [C++11] Add #include's for OwningPtr.Ahmed Charles2014-03-031-0/+1
| | | | | | Allows removing #include's in LLVM while switching to std::unique_ptr. llvm-svn: 202679
* Update for llvm api change.Rafael Espindola2014-02-101-2/+2
| | | | llvm-svn: 201109
* Update for llvm api change.Rafael Espindola2014-01-311-2/+1
| | | | llvm-svn: 200575
* Update for llvm api change.Rafael Espindola2014-01-301-4/+2
| | | | llvm-svn: 200443
* Update for llvm api change.Rafael Espindola2014-01-221-1/+4
| | | | llvm-svn: 199777
* Update for llvm api change.Rafael Espindola2014-01-211-2/+2
| | | | llvm-svn: 199752
* Run clang-format on r197727.Rui Ueyama2013-12-201-67/+62
| | | | llvm-svn: 197788
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-107/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The main changes are in: include/lld/Core/Reference.h include/lld/ReaderWriter/Reader.h Everything else is details to support the main change. 1) Registration based Readers Previously, lld had a tangled interdependency with all the Readers. It would have been impossible to make a streamlined linker (say for a JIT) which just supported one file format and one architecture (no yaml, no archives, etc). The old model also required a LinkingContext to read an object file, which would have made .o inspection tools awkward. The new model is that there is a global Registry object. You programmatically register the Readers you want with the registry object. Whenever you need to read/parse a file, you ask the registry to do it, and the registry tries each registered reader. For ease of use with the existing lld code base, there is one Registry object inside the LinkingContext object. 2) Changing kind value to be a tuple Beside Readers, the registry also keeps track of the mapping for Reference Kind values to and from strings. Along with that, this patch also fixes an ambiguity with the previous Reference::Kind values. The problem was that we wanted to reuse existing relocation type values as Reference::Kind values. But then how can the YAML write know how to convert a value to a string? The fix is to change the 32-bit Reference::Kind into a tuple with an 8-bit namespace (e.g. ELF, COFFF, etc), an 8-bit architecture (e.g. x86_64, PowerPC, etc), and a 16-bit value. This tuple system allows conversion to and from strings with no ambiguities. llvm-svn: 197727
* Make error code variables to have narrower scope.Rui Ueyama2013-12-061-6/+5
| | | | llvm-svn: 196564
* Move definitions to cpp file. No functionality change.Rui Ueyama2013-12-061-0/+156
llvm-svn: 196563
OpenPOWER on IntegriCloud