summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Move ConstantStruct back to 2.5 API.Owen Anderson2009-07-271-1/+1
| | | | llvm-svn: 77266
* Remove Value::{isName, getNameRef}.Daniel Dunbar2009-07-251-2/+2
| | | | | | Also, change MDString to use a StringRef. llvm-svn: 77098
* Initial update to VMCore to use Twines for string arguments.Daniel Dunbar2009-07-251-2/+2
| | | | | | | - The only meat here is in Value.{h,cpp} the rest is essential 'const std::string &' -> 'const Twine &'. llvm-svn: 77048
* Switch ValueSymbolTable to StringRef based API.Daniel Dunbar2009-07-231-4/+2
| | | | llvm-svn: 76894
* Get rid of the Pass+Context magic.Owen Anderson2009-07-221-1/+1
| | | | llvm-svn: 76702
* Add plumbing for the `linker_private' linkage type. This type is meant forBill Wendling2009-07-201-0/+3
| | | | | | | | | "private" symbols which the assember shouldn't strip, but which the linker may remove after evaluation. This is mostly useful for Objective-C metadata. This is plumbing, so we don't have a use of it yet. More to come, etc. llvm-svn: 76385
* llvm_unreachable->llvm_unreachable(0), LLVM_UNREACHABLE->llvm_unreachable.Torok Edwin2009-07-141-4/+4
| | | | | | | | | This adds location info for all llvm_unreachable calls (which is a macro now) in !NDEBUG builds. In NDEBUG builds location info and the message is off (it only prints "UREACHABLE executed"). llvm-svn: 75640
* assert(0) -> LLVM_UNREACHABLE.Torok Edwin2009-07-111-4/+5
| | | | | | | | | Make llvm_unreachable take an optional string, thus moving the cerr<< out of line. LLVM_UNREACHABLE is now a simple wrapper that makes the message go away for NDEBUG builds. llvm-svn: 75379
* Switch GlobalVariable ctors to a sane API, where *either* a context or a ↵Owen Anderson2009-07-081-8/+8
| | | | | | module is required. llvm-svn: 75025
* Push LLVMContext through GlobalVariables and IRBuilder.Owen Anderson2009-07-081-5/+6
| | | | llvm-svn: 74985
* LLVM Context-ification.Owen Anderson2009-07-071-22/+42
| | | | llvm-svn: 74948
* Add a new "available_externally" linkage type. This is intendedChris Lattner2009-04-131-3/+4
| | | | | | | | to support C99 inline, GNU extern inline, etc. Related bugzilla's include PR3517, PR3100, & PR2933. Nothing uses this yet, but it appears to work. llvm-svn: 68940
* Apply ODR linkage changes accidentally dropped duringDuncan Sands2009-03-081-9/+9
| | | | | | final cleaning. This fixes a bunch of testsuite failures. llvm-svn: 66380
* Introduce new linkage types linkonce_odr, weak_odr, common_odrDuncan Sands2009-03-071-7/+14
| | | | | | | | | | | | | | | | | | | | | and extern_weak_odr. These are the same as the non-odr versions, except that they indicate that the global will only be overridden by an *equivalent* global. In C, a function with weak linkage can be overridden by a function which behaves completely differently. This means that IP passes have to skip weak functions, since any deductions made from the function definition might be wrong, since the definition could be replaced by something completely different at link time. This is not allowed in C++, thanks to the ODR (One-Definition-Rule): if a function is replaced by another at link-time, then the new function must be the same as the original function. If a language knows that a function or other global can only be overridden by an equivalent global, it can give it the weak_odr linkage type, and the optimizers will understand that it is alright to make deductions based on the function body. The code generators on the other hand map weak and weak_odr linkage to the same thing. llvm-svn: 66339
* Oops.Mikhail Glushenkov2009-03-031-1/+1
| | | | llvm-svn: 65942
* 80-column violation + trailing whitespace.Mikhail Glushenkov2009-03-031-59/+59
| | | | llvm-svn: 65936
* Add the private linkage.Rafael Espindola2009-01-151-19/+21
| | | | llvm-svn: 62279
* Also properly handle linking of strong alias and weak globalAnton Korobeynikov2008-10-151-25/+39
| | | | llvm-svn: 57595
* Properly handle linking of strong alias with weak function, this fixes PR2883Anton Korobeynikov2008-10-151-1/+1
| | | | llvm-svn: 57594
* Rename isWeakForLinker to mayBeOverridden. Use itDuncan Sands2008-09-291-6/+6
| | | | | | | instead of hasWeakLinkage in a bunch of optimization passes. llvm-svn: 56782
* Make safer variant of alias resolution routine to be defaultAnton Korobeynikov2008-09-091-1/+1
| | | | llvm-svn: 56005
* Fix incorrect linker behaviour: we shouldn't resolve weak aliases.Anton Korobeynikov2008-09-091-2/+2
| | | | llvm-svn: 55997
* Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixesChris Lattner2008-07-141-167/+102
| | | | | | | | | | | | | | | | | the second half of link-global-to-func.ll and causes some minor changes in messages. There are two TODOs here. First, this causes a regression in 2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it). Anton, I would really appreciate it if you could take a look at this. It should be a matter of adding proper alias support to GetLinkageResult, and was probably already a latent bug that would manifest with globals. The second todo is to reimplement LinkAlias in the same pattern as function and global linking. This should be pretty straight-forward for someone who knows aliases, but isn't a requirement for correctness. llvm-svn: 53548
* don't do any linkage, not even type resolution, of symbols that have Chris Lattner2008-07-141-6/+10
| | | | | | internal linkage. llvm-svn: 53547
* implement linking of globals to functions, in one directionChris Lattner2008-07-141-81/+75
| | | | | | | | | | | (replacing a function with a global). This is needed when building llvm itself with LTO on darwin, because of the EXPLICIT_SYMBOL hack in lib/system/DynamicLibrary.cpp. Implementation of linking the other way will need to wait for a cleanup of LinkFunctionProtos. llvm-svn: 53546
* wrap long lines, remove some code from a non-assert build.Chris Lattner2008-07-141-5/+7
| | | | llvm-svn: 53545
* The source and dest of an alias are *not* required to have the same type,Chris Lattner2008-07-101-9/+3
| | | | | | though that would be nice and make sense :). Patch by Nathan Keynes! llvm-svn: 53387
* Make DenseMap's insert return a pair, to more closely resemble std::map.Dan Gohman2008-07-071-1/+1
| | | | llvm-svn: 53177
* Add convenient helper for checking whether global is weak in linker senseAnton Korobeynikov2008-07-051-26/+11
| | | | | | having weak or linkonce or common or extweak LLVM linkage. llvm-svn: 53158
* Override weak stuff during linking of aliases. This fixes PR2463.Anton Korobeynikov2008-07-051-8/+21
| | | | llvm-svn: 53156
* Properly link alias and function decls. This fixes PR2146Anton Korobeynikov2008-07-051-8/+27
| | | | llvm-svn: 53154
* when linking globals, make sure to preserve the address space of the global.Chris Lattner2008-06-271-4/+8
| | | | llvm-svn: 52810
* Fix an error handling redefinition of linkonce functions where theChris Lattner2008-06-201-18/+14
| | | | | | types differ. Patch by Nathan Keynes! llvm-svn: 52527
* Add a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff.Chris Lattner2008-06-161-2/+5
| | | | llvm-svn: 52374
* stop making PATypeHolder's so crazily.Chris Lattner2008-06-161-33/+33
| | | | llvm-svn: 52364
* use a real associative container for type association instead of usingChris Lattner2008-06-161-8/+94
| | | | | | | a vector with a linear search. This speeds up the linking testcase in PR1860 from 0.965s to 0.385s on my system. llvm-svn: 52357
* bail out sooner if we have two concrete but different types.Chris Lattner2008-06-161-0/+4
| | | | llvm-svn: 52351
* simplify some code.Chris Lattner2008-06-161-24/+21
| | | | llvm-svn: 52350
* 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. llvm-svn: 52347
* handle vectors. Any integers that got here would necessarily be different ↵Chris Lattner2008-06-161-8/+11
| | | | | | already. llvm-svn: 52341
* 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. llvm-svn: 52340
* simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out ofChris Lattner2008-06-161-23/+20
| | | | | | ResolveTypes into the one place that needs it. llvm-svn: 52338
* 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 llvm-svn: 52135
* 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. llvm-svn: 52134
* simplify function visibility handling.Chris Lattner2008-06-091-7/+8
| | | | llvm-svn: 52133
* 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. llvm-svn: 51567
* 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. llvm-svn: 51143
* 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. llvm-svn: 51118
* Fix linking of internal aliasesAnton Korobeynikov2008-05-101-28/+55
| | | | llvm-svn: 50950
* Turn StripPointerCast() into a methodAnton Korobeynikov2008-05-071-1/+2
| | | | llvm-svn: 50836
OpenPOWER on IntegriCloud