llvm-project/lld
Simon Atanasyan 64e36b67e2 [ELF] Simplify adding default atoms
Now 'writer' creates an instance of `RuntimeFile` in the constructor, then
populates the file in the virtual function `addDefaultAtoms`, then pass
owning of this file to the caller of virtual function `createImplicitFiles`.

First, we do not need to keep an instance of `RuntimeFile` so long. It is
enough to create the file, right after that populate it and pass the owning.

Second, relationship between `createImplicitFiles` and `addDefaultAtoms`
is complicated. The `createImplicitFiles` might call `addDefaultAtoms`,
overridden version of `addDefaultAtoms` might call base class `addDefaultAtoms`,
and overridden version of `createImplicitFiles` might call base class
`createImplicitFiles` as well as `addDefaultAtoms`.

The patch solves both problems above. It creates and populates runtime files
right in the createImplicitFiles(), removes `addDefaultAtoms` at all and
does not keep references to runtime files in class fields.

llvm-svn: 234347
2015-04-07 20:11:38 +00:00
..
cmake/modules Add VTune as an optional external dependency and add task tracking. 2013-04-06 00:56:40 +00:00
docs Remove Makefiles. 2015-03-26 20:09:47 +00:00
include/lld Fix a very silly typo in my previous commit. I need more coffee. 2015-04-06 22:57:58 +00:00
lib [ELF] Simplify adding default atoms 2015-04-07 20:11:38 +00:00
test [ARM] Add mapping symbols to PLT entries 2015-04-07 07:04:42 +00:00
tools Remove Makefiles. 2015-03-26 20:09:47 +00:00
unittests Remove Makefiles. 2015-03-26 20:09:47 +00:00
utils Move the 'linker-script-test' binary to the tools directory. 2015-03-11 22:05:49 +00:00
.arcconfig Update Phabricator server. 2014-04-07 04:52:24 +00:00
.clang-format Remove redundant "Standard: Cpp11" tag. The LLVM style has used the 2014-07-04 12:08:03 +00:00
.gitignore Update .gitignore to ignore hidden MacOSX Finder droppings 2014-07-16 21:01:17 +00:00
CMakeLists.txt Move the 'linker-script-test' binary to the tools directory. 2015-03-11 22:05:49 +00:00
LICENSE.TXT Update copyright year to 2015. 2015-03-12 20:14:35 +00:00
README.md Test commit 2012-09-14 00:00:39 +00:00

README.md

LLVM Linker (lld)

This directory and its subdirectories contain source code for the LLVM Linker, a modular cross platform linker which is built as part of the LLVM compiler infrastructure project.

lld is open source software. You may freely distribute it under the terms of the license agreement found in LICENSE.txt.