summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/WinLinkInputGraph.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Re-commit r225674: Convert other drivers to use WrapperNode.Rui Ueyama2015-01-151-39/+0
| | | | | | | | The original commit had an issue with Mac OS dylib files. It didn't handle fat binary dylib files correctly. This patch includes a fix. A test for that case has already been committed in r225764. llvm-svn: 226123
* Revert "Convert other drivers to use WrapperNode" and subsequent commits.Rui Ueyama2015-01-141-0/+39
| | | | | | | r225764 broke a basic functionality on Mac OS. This change reverts r225764, r225766, r225767, r225769, r225814, r225816, r225829, and r225832. llvm-svn: 225859
* Convert other drivers to use WrapperNode.Rui Ueyama2015-01-131-39/+0
| | | | llvm-svn: 225764
* More WinLinkInputGraph cleanup.Rui Ueyama2014-12-141-4/+0
| | | | | | | This function is called only from WinLinkDriver.cpp. Move the function to that file and mark as static. llvm-svn: 224211
* [PECOFF] Resolve file name in the driver, not in InputElement.Rui Ueyama2014-12-141-14/+0
| | | | llvm-svn: 224209
* Remove code duplication.Rui Ueyama2014-12-141-6/+0
| | | | llvm-svn: 224206
* Make File always take the ownership of a MemoryBuffer.Rui Ueyama2014-12-121-2/+4
| | | | | | | | | | | | | | The documentation of parseFile() said that "the resulting File object may take ownership of the MemoryBuffer." So, whether or not the ownership of a MemoryBuffer would be taken was not clear. A FileNode (a subclass of InputElement, which is being deprecated) keeps the ownership if a File doesn't take it. This patch makes File always take the ownership of a buffer. Buffers lifespan is not always the same as File instances. Files are able to deallocate buffers after parsing the contents. llvm-svn: 224113
* Don't import error_code into the lld namespace.Rafael Espindola2014-06-121-5/+5
| | | | llvm-svn: 210785
* Use error_code() instead of error_code::succes()Rafael Espindola2014-05-311-1/+1
| | | | | | | There is no std::error_code::success, so this removes much of the noise in transitioning to std::error_code. llvm-svn: 209948
* [PECOFF] Make PECOFFFileNode::parse idempotent.Rui Ueyama2014-04-011-0/+3
| | | | | | | | PECOFFFileNode::parse can be called twice -- once by WinLink driver and once more by Driver. We want to make sure that the second call won't mess up the internal data. llvm-svn: 205284
* [PECOFF] Treat .imp as an import library file.Rui Ueyama2014-04-011-2/+6
| | | | | | | | | | | | Some Clang build uses .imp not .lib file extension for an import library file, so we need to treat such file as a library file. Ideally we should not rely on file extensions to detect file type. Instead we should use magic bytes at beginning of a file. The GNU-compatible driver actually does that but it made writing unit tests hard, so I chose an ad-hoc approach for now. llvm-svn: 205283
* Use getError instead of the error_code operator.Rafael Espindola2014-01-081-2/+2
| | | | llvm-svn: 198797
* [lld] Introduce registry and Reference kind tupleNick Kledzik2013-12-191-13/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Simplify a switch statement.Rui Ueyama2013-12-031-13/+7
| | | | llvm-svn: 196200
* [PECOFF] Print reason if file parsing failed.Rui Ueyama2013-12-031-2/+6
| | | | llvm-svn: 196185
* Fix file header comment.Rui Ueyama2013-11-211-1/+1
| | | | llvm-svn: 195393
* Rename allocateString -> allocate.Rui Ueyama2013-11-211-2/+2
| | | | llvm-svn: 195284
* Reverse the condition for readability.Rui Ueyama2013-11-201-3/+3
| | | | llvm-svn: 195282
* Move member functions to its own cpp file.Rui Ueyama2013-11-201-0/+68
llvm-svn: 195281
OpenPOWER on IntegriCloud