summaryrefslogtreecommitdiffstats
path: root/lld/lib/ReaderWriter/MachO/ShimPass.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [LLD] Migrate llvm::make_unique to std::make_uniqueJonas Devlieghere2019-08-141-1/+1
| | | | | | | | | | Now that we've moved to C++14, we no longer need the llvm::make_unique implementation from STLExtras.h. This patch is a mechanical replacement of (hopefully) all the llvm::make_unique instances across the monorepo. Differential revision: https://reviews.llvm.org/D66259 llvm-svn: 368936
* Update the file headers across all of the LLVM projects in the monorepoChandler Carruth2019-01-191-4/+3
| | | | | | | | | | | | | | | | | to reflect the new license. We understand that people may be surprised that we're moving the header entirely to discuss the new license. We checked this carefully with the Foundation's lawyer and we believe this is the correct approach. Essentially, all code in the project is now made available by the LLVM project under our new license, so you will see that the license headers include that license only. Some of our contributors have contributed code under our old license, and accordingly, we have retained a copy of our old license notice in the top-level files in each project and repository. llvm-svn: 351636
* Move new lld's code to Common subdirectory.Rui Ueyama2017-10-021-1/+1
| | | | | | | | | | New lld's files are spread under lib subdirectory, and it isn't easy to find which files are actually maintained. This patch moves maintained files to Common subdirectory. Differential Revision: https://reviews.llvm.org/D37645 llvm-svn: 314719
* Prevent at compile time converting from Error::success() to Expected<T>Mehdi Amini2016-11-111-2/+2
| | | | | | | | This would trigger an assertion at runtime otherwise. Differential Revision: https://reviews.llvm.org/D26482 llvm-svn: 286562
* Convert lld Pass::runOnFile to llvm::Error from std::error_code. NFC.Pete Cooper2016-03-301-3/+3
| | | | | | | Pretty mechanical change here. Just replacing all the std::error_code() with llvm::Error() and make_dynamic_error_code with make_error<GenericError> llvm-svn: 264917
* Move ownership of Pass File's to the MachoLinkingContext.Pete Cooper2016-03-211-2/+3
| | | | | | | | | In trying to fix the leaks in the MachO lld codebase, we need to have a better model for file and atom ownership. Having the context own everything seems like the simplest model, so change all the passes to allocate File's on the context instead of owning files as a member. llvm-svn: 264004
* Set ordinals of all File's created in MachO passes.Pete Cooper2016-02-021-1/+3
| | | | | | | | | | | When we do debug printing of atoms, they expect their parent file to have an ordinal. Right now we trigger a bunch of asserts. This doesn't actually manifest in differences in any real tests, but even if the only thing it does is improve debuggability then its still useful. llvm-svn: 259450
* Simplify Pass::perform to take a SimpleFile& instead of unique_ptr<SimpleFile>&David Blaikie2015-06-191-5/+4
| | | | | | | | None of the implementations replace the SimpleFile with some other file, they just modify the SimpleFile in-place, so a direct reference to the file is sufficient. llvm-svn: 240167
* [lld] Allow LLD passes to return error codes.Lang Hames2015-06-191-2/+4
| | | | llvm-svn: 240147
* Do s/_context/_ctx/g globally.Rui Ueyama2015-04-101-6/+3
| | | | | | | | I believe this patch eliminates all remaining uses of _context or _linkingContext variable names. Consistent naming improves readability. llvm-svn: 234645
* Merge MutableFile with SimpleFile.Rui Ueyama2015-04-071-2/+1
| | | | | | | | SimpleFile is the only derived class of MutableFile. This patch reduces the height of class hierarchy by removing MutableFile class. llvm-svn: 234354
* Add missing includes for make_unique, lld edition.Benjamin Kramer2015-03-021-1/+1
| | | | llvm-svn: 230925
* Use make_unique.Rui Ueyama2015-02-061-1/+1
| | | | llvm-svn: 228453
* Sort include files according to convention.Shankar Easwaran2014-10-181-2/+0
| | | | llvm-svn: 220131
* [mach-o] Add Pass to create are shim Atoms for ARM interworking.Nick Kledzik2014-10-141-0/+131
Arm code has two instruction encodings "thumb" and "arm". When branching from one code encoding to another, you need to use an instruction that switches the instruction mode. Usually the transition only happens at call sites, and the linker can transform a BL instruction in BLX (or vice versa). But if the compiler did a tail call optimization and a function ends with a branch (not branch and link), there is no pc-rel BX instruction. The ShimPass looks for pc-rel B instructions that will need to switch mode. For those cases it synthesizes a shim which does the transition, then modifies the original atom with the B instruction to target to the shim atom. llvm-svn: 219655
OpenPOWER on IntegriCloud