summaryrefslogtreecommitdiffstats
path: root/lld/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* lld matching change for llvm change r308690 to add error handling toKevin Enderby2017-07-201-1/+4
| | | | | | the dyld compact export entries in libObject. llvm-svn: 308691
* Use StringRef::contains().Rui Ueyama2017-07-191-3/+3
| | | | llvm-svn: 308526
* [MachO] Add missing byte-swaps when reading dyld_infoTom Stellard2017-07-071-3/+3
| | | | | | | | | | | | | | | | | | | | Summary: This fixes the following tests on big-endian hosts: lld :: mach-o/dylib-install-names.yaml lld :: mach-o/force_load-dylib.yaml lld :: mach-o/lib-search-paths.yaml lld :: mach-o/upward-dylib-load-command.yaml Reviewers: lhames, kledzik, ruiu Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D35022 llvm-svn: 307405
* Fix ODR violations due to abuse of LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTORRichard Smith2017-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | This is a short-term fix for PR33650 aimed to get the modules build bots green again. Remove all the places where we use the LLVM_YAML_IS_(FLOW_)?SEQUENCE_VECTOR macros to try to locally specialize a global template for a global type. That's not how C++ works. Instead, we now centrally define how to format vectors of fundamental types and of string (std::string and StringRef). We use flow formatting for the former cases, since that's the obvious right thing to do; in the latter case, it's less clear what the right choice is, but flow formatting is really bad for some cases (due to very long strings), so we pick block formatting. (Many of the cases that were using flow formatting for strings are improved by this change.) Other than the flow -> block formatting change for some vectors of strings, this should result in no functionality change. Differential Revision: https://reviews.llvm.org/D34907 Corresponding LLVM change is r306878. llvm-svn: 306880
* Tweak to match change in LLVM API, in r306315.Paul Robinson2017-06-261-2/+2
| | | | llvm-svn: 306316
* [GSoC] Flag value completion for clangYuka Takahashi2017-06-201-7/+9
| | | | | | | | | | | | This is patch for GSoC project, bash-completion for clang. To use this on bash, please run `source clang/utils/bash-autocomplete.sh`. bash-autocomplete.sh is code for bash-completion. In this patch, Options.td was mainly changed in order to add value class in Options.inc. llvm-svn: 305805
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-101-0/+1
| | | | llvm-svn: 305145
* Add BinaryFormat to lld librariesSam Clegg2017-06-071-1/+2
| | | | | | | | | | | | Without this, when building with shared BUILD_SHARED_LIBS=ON I get errors such as: lib/Core/Reader.cpp:40: error: undefined reference to 'llvm::identify_magic(llvm::StringRef)' Differential Revision: https://reviews.llvm.org/D34004 llvm-svn: 304932
* Removed the redundant comment. NFC.Galina Kistanova2017-06-071-1/+0
| | | | llvm-svn: 304874
* Added LLVM_FALLTHROUGH to address warning: this statement may fall through. NFC.Galina Kistanova2017-06-071-0/+1
| | | | llvm-svn: 304873
* Move Object format code to lib/BinaryFormat.Zachary Turner2017-06-0714-32/+41
| | | | | | | | | | | | This creates a new library called BinaryFormat that has all of the headers from llvm/Support containing structure and layout definitions for various types of binary formats like dwarf, coff, elf, etc as well as the code for identifying a file from its magic. Differential Revision: https://reviews.llvm.org/D33843 llvm-svn: 304864
* [Support] Move Parallel algorithms from LLD to LLVM.Zachary Turner2017-05-113-144/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D33024 llvm-svn: 302748
* Rename variables to conform to LLVM naming conventions.Zachary Turner2017-05-101-5/+5
| | | | llvm-svn: 302697
* [Core] Make parallel algorithms match C++ Parallelism TS.Zachary Turner2017-05-101-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D33016 llvm-svn: 302613
* Fix undefined pthread references when building against libc++Eric Fiselier2017-05-061-0/+3
| | | | llvm-svn: 302363
* Fix build breakage on Linux.Rui Ueyama2017-05-051-0/+1
| | | | llvm-svn: 302295
* Fix #include case sensitivity problem.Zachary Turner2017-05-051-1/+1
| | | | llvm-svn: 302291
* Split up Parallel and LLVM'ize naming conventions.Zachary Turner2017-05-052-0/+141
| | | | | | | | | | | | This is one step in preparation of raising this up to LLVM. This hides all of the Executor stuff in a private implementation file, leaving only the core algorithms and the TaskGroup class exposed. In doing so, fix up all the variable names to conform to LLVM style. Differential Revision: https://reviews.llvm.org/D32890 llvm-svn: 302288
* [MachO/X86_64] Simplify isDataInCodeTransition().Davide Italiano2017-04-151-8/+1
| | | | llvm-svn: 300385
* [MachO/AArch64] Merge multiple switch cases into one. NFCI.Davide Italiano2017-04-151-4/+0
| | | | llvm-svn: 300384
* [ELF] - Allow the Code Model flag when using LTOMartell Malone2017-02-281-0/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D29445 llvm-svn: 296542
* [CMake] Fix pthread handling for out-of-tree buildsEric Fiselier2017-02-101-1/+1
| | | | | | | | | | | | | | | LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects to correctly link the threading library when needed. Unfortunately `PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed and therefore can't be used when configuring out-of-tree builds. This causes such builds to fail since `pthread` isn't being correctly linked. This patch attempts to fix that problem by renaming and exporting `LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB` because It seemed likely to cause collisions with downstream users of `LLVMConfig.cmake`. llvm-svn: 294690
* Fix shared build after r293965 (Core) and r293967 (COFF)Ismail Donmez2017-02-031-0/+1
| | | | llvm-svn: 293996
* added missing dependency on intrinsics_gen to lib/CoreBob Haarman2017-02-031-0/+7
| | | | llvm-svn: 293986
* added missing files for r293965Bob Haarman2017-02-021-0/+28
| | | | llvm-svn: 293966
* add the ability to call InitTargetOptionsFromCodeGenFlags from multiple objectsBob Haarman2017-02-021-0/+1
| | | | | | | | | | | | | | Summary: llvm/CodeGen/CommandFlags.h a utility function InitTargetOptionsFromCodeGenFlags which is used to set target options from flags based on the command line. The command line flags are stored in globals defined in the same file, and including the file in multiple places causes the globals to be defined multiple times, leading to linker errors. This change adds a single place in lld where these globals are defined and exports only the utility function. This makes it possible to call InitTargetOptionsFromCodeGenFlags from multiple places in lld, which a follow-up change will do. Reviewers: davide, ruiu Reviewed By: davide, ruiu Subscribers: mgorny Differential Revision: https://reviews.llvm.org/D29058 llvm-svn: 293965
* [lld][cmake] Fix LLVM_LINK_LLVM_DYLIB buildPavel Labath2017-01-096-14/+24
| | | | | | | | | | | | | | | | | | | | | | | Summary: Lld's build had a couple of issues which prevented a successfull LLVM_LINK_LLVM_DYLIB compilation. - add_llvm_library vs llvm_add_library: One adds a library to libLLVM.so, other one doesn't. Lld was using the wrong one, causing symbols to be mupltiply defined in things linking to libLLVM. - confusion when to use LINK_LIBS vs LINK_COMPONENTS in llvm_add_library - not using LLVM_LINK_COMPONENTS for add_lld_tool With these fixes lld compiles and it's test suite passes both in LLVM_LINK_LLVM_DYLIB mode and without it. Reviewers: ruiu, beanz Subscribers: llvm-commits, mgorny Differential Revision: https://reviews.llvm.org/D28397 llvm-svn: 291432
* Define sys::path::convert_to_slashRui Ueyama2017-01-091-11/+1
| | | | | | | | This patch moves convertToUnixPathSeparator from LLD to LLVM. Differential Revision: https://reviews.llvm.org/D28444 llvm-svn: 291414
* Revert r291221.Rafael Espindola2017-01-061-1/+11
| | | | | | Should bring back the windows bots. llvm-svn: 291263
* Rename lld::stringize -> lld::toString.Rui Ueyama2017-01-061-1/+1
| | | | llvm-svn: 291223
* Remove lld::convertToUnixPathSeparator.Rui Ueyama2017-01-061-11/+1
| | | | | | | Now TarWriter takes care of path separator conversion, so we don't need to handle that in LLD. llvm-svn: 291221
* Use TarWriter to create tar archives instead of cpio.Rui Ueyama2017-01-061-54/+2
| | | | | | | | | | This is how we use TarWriter in LLD. Now LLD does not append a file extension, so you need to pass `--reproduce foo.tar` instead of `--reproduce foo`. Differential Revision: https://reviews.llvm.org/D28103 llvm-svn: 291210
* Remove lld/Support/Memory.h.Rui Ueyama2016-12-183-37/+0
| | | | | | | | | | | | 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
* Remove unnecessary llvm/Config/config.h includesMichal Gorny2016-12-141-1/+0
| | | | | | | | | | | | | | | | | | Remove the includes of <llvm/Config/config.h> private LLVM header. The relevant files seem not to use any definitions from that file, and it is not available when building against installed LLVM. The use in lib/ReaderWriter/MachO/MachOLinkingContext.cpp originates from rL218718, and the use in ELF/Strings.cpp from rL274804 (where it was moved from Symbols.cpp). In both cases, they were added as a part of demangling support, and they provided HAVE_CXXABI_H. Since we are now using the LLVM demangler library instead, the code was removed and the includes and no longer necessary. Differential Revision: https://reviews.llvm.org/D27757 llvm-svn: 289707
* Move Memory.{h,cpp} to lld/Support so that we can use them from COFF.Rui Ueyama2016-12-083-0/+37
| | | | llvm-svn: 289084
* Fix Windows buildbots.Rui Ueyama2016-12-071-1/+1
| | | | llvm-svn: 288975
* Make convertToUnixPathSeparator return a new string instead of mutating ↵Rui Ueyama2016-12-071-7/+8
| | | | | | argument. llvm-svn: 288972
* [ELF] - Print absolute file name in errors when possible.George Rimar2016-12-071-8/+6
| | | | | | | | | | | | | | | | | | | Currently LLD prints basename of source file name in error messages, for example: $ mkdir foo $ echo 'void _start(void) { foobar(); }' > foo/bar.c $ gcc -g -c foo/bar.c $ bin/ld.lld -o out bar.o bin/ld.lld: error: bar.c:1: undefined symbol 'foobar' $ This should say: bin/ld.lld: error: foo/bar.c:1: undefined symbol 'foobar' This is PR31299 Differential revision: https://reviews.llvm.org/D27506 llvm-svn: 288966
* [ELF] Don't replace path separators on *NIX.Davide Italiano2016-11-161-0/+2
| | | | | | | | | Apparently this is wrong because it's legal to have a filename on UNIX which contains a backslash. Differential Revision: https://reviews.llvm.org/D26734 llvm-svn: 287143
* [ELF] - Fixed comment. NFC.George Rimar2016-11-121-1/+1
| | | | llvm-svn: 286712
* Fix wrong formatting in lld introduced in r286561 (NFC)Mehdi Amini2016-11-115-5/+5
| | | | | | Pointed out by Davide. llvm-svn: 286649
* Fix code to deal with recent LLVM changes.Greg Clayton2016-11-111-2/+5
| | | | | | https://reviews.llvm.org/D26526 llvm-svn: 286598
* [ELF] - Use backward slashes inside response filesGeorge Rimar2016-11-111-4/+10
| | | | | | | | | | Patch replaces forward slashes with backward inside response.txt This is https://llvm.org/bugs/show_bug.cgi?id=30951. Differential revision: https://reviews.llvm.org/D26443 llvm-svn: 286589
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-1120-82/+82
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Create a vector containing all input sections.Rui Ueyama2016-11-051-2/+2
| | | | | | | | | | | | | | | | Previously, we do this piece of code to iterate over all input sections. for (elf::ObjectFile<ELFT> *F : Symtab.getObjectFiles()) for (InputSectionBase<ELFT> *S : F->getSections()) It turned out that this mechanisms doesn't work well with synthetic input sections because synthetic input sections don't belong to any input file. This patch defines a vector that contains all input sections including synthetic ones. llvm-svn: 286051
* Fix some Clang-tidy modernize-use-default and Include What You Use warnings; ↵Eugene Zelenko2016-11-053-12/+10
| | | | | | | | other minor fixes. Differential revision: https://reviews.llvm.org/D26320 llvm-svn: 286030
* Fix some Clang-tidy modernize-use-default and Include What You Use warnings; ↵Eugene Zelenko2016-11-042-12/+33
| | | | | | | | other minor fixes. Differential revision: https://reviews.llvm.org/D26293 llvm-svn: 286000
* Fix build breakage on buildbots that was due to 285309.Greg Clayton2016-10-271-3/+4
| | | | llvm-svn: 285321
* Truncate a SVN path part from --version output.Rui Ueyama2016-10-261-18/+23
| | | | | | This is in sync with what clang does. llvm-svn: 285163
* Fix Clang-tidy readability-redundant-member-init warnings; other minor fixesEugene Zelenko2016-10-251-13/+16
| | | | | | Differential revision: https://reviews.llvm.org/D25931 llvm-svn: 285086
OpenPOWER on IntegriCloud