Commit Graph

9 Commits

Author SHA1 Message Date
George Rimar 67c60727ce [ELF] - Apply clang-format. NFC.
llvm-svn: 308297
2017-07-18 11:55:35 +00:00
Rui Ueyama 9381eb1045 Remove lld/Support/Memory.h.
I thought for a while about how to remove it, but it looks like we
can just copy the file for now. Of course I'm not happy about that,
but it's just less than 50 lines of code, and we already have
duplicate code in Error.h and some other places. I want to solve
them all at once later.

Differential Revision: https://reviews.llvm.org/D27819

llvm-svn: 290062
2016-12-18 14:06:06 +00:00
Rui Ueyama 520d9169e6 Move Memory.{h,cpp} to lld/Support so that we can use them from COFF.
llvm-svn: 289084
2016-12-08 18:31:13 +00:00
George Rimar 9602637030 [ELF] - Fix mistype. NFC.
Thanks to Malcolm Parsons who pointed on that.

llvm-svn: 286239
2016-11-08 15:26:21 +00:00
George Rimar d700c357d4 [ELF] - Fixed mistype. NFC.
llvm-svn: 286220
2016-11-08 07:46:52 +00:00
Rui Ueyama cb640964a8 Make a function in a header "inline" instead of "static".
llvm-svn: 285775
2016-11-02 00:16:43 +00:00
Rui Ueyama d52adb3917 Provide a convenient function to allocate and initialize objects.
You can now write make<T>(Args) instead of new (alloc<T>()) T(Args).

llvm-svn: 285760
2016-11-01 22:53:18 +00:00
Rafael Espindola 5c9e8f5e52 Replace GAlloc with a template function.
This patch replaces GAlloc<ELFT>::<sometype>.Allocate() with
alloc<sometype<ELFT>>().

Patch by Rui!

llvm-svn: 285748
2016-11-01 21:06:40 +00:00
Rui Ueyama 55518e7dd8 Consolidate BumpPtrAllocators.
Previously, we have a lot of BumpPtrAllocators, but all these
allocators virtually have the same lifetime because they are
not freed until the linker finishes its job. This patch aggregates
them into a single allocator.

Differential revision: https://reviews.llvm.org/D26042

llvm-svn: 285452
2016-10-28 20:57:25 +00:00