aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
Commit message (Collapse)AuthorAgeFilesLines
...
* simplify some code.Chris Lattner2008-06-161-24/+21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52350 91177308-0d34-0410-b5e6-96231b3b80d8
* Apply a patch from Nathan Keynes, which speeds up llvm-link onChris Lattner2008-06-161-1/+0
| | | | | | | | the testcases in PR1860 from taking more than 1 hour (when I killed it) to taking 1s. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52347 91177308-0d34-0410-b5e6-96231b3b80d8
* handle vectors. Any integers that got here would necessarily be different ↵Chris Lattner2008-06-161-8/+11
| | | | | | already. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52341 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify ResolveTypes by pulling the null case out into the one Chris Lattner2008-06-161-42/+30
| | | | | | | | | | | client that cares and simplifying its control flow. Remove the DestST argument to ResolveTypes and RecursiveResolveTypes* which are dead now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52340 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out ofChris Lattner2008-06-161-23/+20
| | | | | | | ResolveTypes into the one place that needs it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52338 91177308-0d34-0410-b5e6-96231b3b80d8
* use 'continue' to make the function linker simpler. When linking a strongChris Lattner2008-06-091-21/+37
| | | | | | | | function into a weak function, zap the weak function body so that the strong one overrides it. This fixes PR2410 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52135 91177308-0d34-0410-b5e6-96231b3b80d8
* minor changes to short circuit the 'no linkage' case earlier forChris Lattner2008-06-091-27/+40
| | | | | | | | function bodies. We now don't try to unify types or handling type mismatches if when linking an internal foo to an external foo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52134 91177308-0d34-0410-b5e6-96231b3b80d8
* simplify function visibility handling.Chris Lattner2008-06-091-7/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52133 91177308-0d34-0410-b5e6-96231b3b80d8
* Factor code to copy global value attributes likeDuncan Sands2008-05-261-14/+4
| | | | | | | | | | | | | | | | the section or the visibility from one global value to another: copyAttributesFrom. This is particularly useful for duplicating functions: previously this was done by explicitly copying each attribute in turn at each place where a new function was created out of an old one, with the result that obscure attributes were regularly forgotten (like the collector or the section). Hopefully now everything is uniform and nothing is forgotten. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51567 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a bunch of 80col violations that arose from the Create API change. Tweak ↵Gabor Greif2008-05-151-2/+4
| | | | | | makefile targets to find these better. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51143 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CommonLinkage; currently tentative definitionsDale Johannesen2008-05-141-10/+18
| | | | | | | | | | | | are represented as "weak", but there are subtle differences in some cases on Darwin, so we need both. The intent is that "common" will behave identically to "weak" unless somebody changes their target to do something else. No functional change as yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51118 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linking of internal aliasesAnton Korobeynikov2008-05-101-28/+55
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50950 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn StripPointerCast() into a methodAnton Korobeynikov2008-05-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50836 91177308-0d34-0410-b5e6-96231b3b80d8
* If weak GlobalVariable was bitcast'ed to different type during linkingAnton Korobeynikov2008-05-061-1/+1
| | | | | | | we will need to strip all casts for intializer lookup. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50776 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r49614. As Dan pointed out, some of these aren't correct.Owen Anderson2008-04-141-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49657 91177308-0d34-0410-b5e6-96231b3b80d8
* Replace calls of the form V1->setName(V2->getName()) with V1->takeName(V2), Owen Anderson2008-04-131-1/+1
| | | | | | | which is significantly more efficient. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49614 91177308-0d34-0410-b5e6-96231b3b80d8
* API changes for class Use size reduction, wave 1.Gabor Greif2008-04-061-4/+4
| | | | | | | | | Specifically, introduction of XXX::Create methods for Users that have a potentially variable number of Uses. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49277 91177308-0d34-0410-b5e6-96231b3b80d8
* Change the MemoryBuffer::getFile* methods to take just a pointer to theChris Lattner2008-04-011-3/+3
| | | | | | | | | start of a filename, not a filename+length. All clients can produce a null terminated name, and the system api's require null terminated strings anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49041 91177308-0d34-0410-b5e6-96231b3b80d8
* Ultimately resolve aliases during linking, if possibleAnton Korobeynikov2008-03-111-5/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48259 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix thinko: alias always defines new symbol. Even is aliasee itself is ↵Anton Korobeynikov2008-03-111-7/+2
| | | | | | undefined. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48203 91177308-0d34-0410-b5e6-96231b3b80d8
* Add sanity checksAnton Korobeynikov2008-03-101-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48184 91177308-0d34-0410-b5e6-96231b3b80d8
* Typo: 'function' => 'alias'Anton Korobeynikov2008-03-101-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48183 91177308-0d34-0410-b5e6-96231b3b80d8
* Syntactic sugar'ify stuff :)Anton Korobeynikov2008-03-101-15/+15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48182 91177308-0d34-0410-b5e6-96231b3b80d8
* Always run 'make check' :) Fix fallout from prev. commit: query for possibleAnton Korobeynikov2008-03-101-1/+1
| | | | | | | alias destination only if we don't have anything to link to git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48181 91177308-0d34-0410-b5e6-96231b3b80d8
* Make error messages to have common styleAnton Korobeynikov2008-03-101-18/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48180 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly link globals with aliasesAnton Korobeynikov2008-03-101-20/+41
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48179 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the LinkGlobal weirderness in common linking phase.Anton Korobeynikov2008-03-101-33/+44
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48177 91177308-0d34-0410-b5e6-96231b3b80d8
* TypoAnton Korobeynikov2008-03-101-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48176 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some compilation errors on msvc:Ted Kremenek2008-03-091-3/+3
| | | | | | | | | | - "Redefinition of I" (iterator masks previous definition) - include missing header file Patch by Argiris Kirtzidis! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48115 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify some important bitsAnton Korobeynikov2008-03-071-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48010 91177308-0d34-0410-b5e6-96231b3b80d8
* Small cleanup: propagate thread-localness via generic routine.Anton Korobeynikov2008-03-071-7/+10
| | | | | | | No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48009 91177308-0d34-0410-b5e6-96231b3b80d8
* Missed patch from my last commitAnton Korobeynikov2008-03-051-0/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47977 91177308-0d34-0410-b5e6-96231b3b80d8
* Resolve aliases to aliasees, where possibleAnton Korobeynikov2008-03-051-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47975 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle functions as targets during linking of aliases as wellAnton Korobeynikov2008-03-051-1/+25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47974 91177308-0d34-0410-b5e6-96231b3b80d8
* Try hard to link aliases. Checks can be too strict by now.Anton Korobeynikov2008-03-051-20/+101
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47968 91177308-0d34-0410-b5e6-96231b3b80d8
* Remember the source->dest mapping when copying aliases. This fixes PR2054Anton Korobeynikov2008-03-051-4/+10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47945 91177308-0d34-0410-b5e6-96231b3b80d8
* Clarify the state-of-the-artAnton Korobeynikov2008-03-051-9/+12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47944 91177308-0d34-0410-b5e6-96231b3b80d8
* Properly populate lists of defined/undefined symbols in presence of aliasesAnton Korobeynikov2008-03-041-1/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47900 91177308-0d34-0410-b5e6-96231b3b80d8
* Emit an error when a library is not found. It is the GNU ld behavior and it ↵Lauro Ramos Venancio2008-02-271-1/+1
| | | | | | is expected by the configure scripts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47674 91177308-0d34-0410-b5e6-96231b3b80d8
* And final pack of warnings silencingAnton Korobeynikov2008-02-201-2/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47372 91177308-0d34-0410-b5e6-96231b3b80d8
* random cleanups.Chris Lattner2008-02-191-7/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47334 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-294-8/+8
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45418 91177308-0d34-0410-b5e6-96231b3b80d8
* remove attribution from lib Makefiles.Chris Lattner2007-12-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45415 91177308-0d34-0410-b5e6-96231b3b80d8
* Ignore functions with internal linkages during linking. This snipped mimics theAnton Korobeynikov2007-12-271-0/+3
| | | | | | | behaviour of LinkGlobals() function. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45375 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixing several transforms which would drop the collector attributeGordon Henriksen2007-12-251-0/+2
| | | | | | when copying functions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45356 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1146: parameter attributes are longer part ofDuncan Sands2007-11-271-0/+1
| | | | | | | | | | | | | the function type, instead they belong to functions and function calls. This is an updated and slightly corrected version of Reid Spencer's original patch. The only known problem is that auto-upgrading of bitcode files doesn't seem to work properly (see test/Bitcode/AutoUpgradeIntrinsics.ll). Hopefully a bitcode guru (who might that be? :) ) will fix it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44359 91177308-0d34-0410-b5e6-96231b3b80d8
* Use correct parentheses with the '&& "..."' idiom in an assert.Dan Gohman2007-10-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42750 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR1611 - Visibility should be ignored for a declarationChris Lattner2007-08-191-6/+13
| | | | | | | | when a definition's visibility is different. Likewise, the visibility of two declarations mismatching is not an error. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41174 91177308-0d34-0410-b5e6-96231b3b80d8
* Improve error handling in the linker by:Reid Spencer2007-08-161-6/+6
| | | | | | | | | | | | | | | 1. Eliminate redundant error messages. LinkInFile and LinkInArchive already call the error() method in each case so there's no use telling the user again that an item couldn't be linked in. 2. Improve the formatting of error messages (separating content). 3. Change the wording for the warning about unrecognized files. Make it clear that the file is being ignored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41121 91177308-0d34-0410-b5e6-96231b3b80d8
* Ensure that error messages a propagated from calls to LinkInModule so they getReid Spencer2007-08-161-3/+4
| | | | | | | reported to the end user. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41117 91177308-0d34-0410-b5e6-96231b3b80d8