summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove unnecessary #include.Dan Gohman2009-09-121-1/+0
| | | | llvm-svn: 81636
* There is not any need to copy metadata while merging modules.Devang Patel2009-09-031-8/+2
| | | | llvm-svn: 80941
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-0/+1
| | | | | | | | | | | | | | | | | | forcing them down into various .cpp files. This change also: 1. Renames TimeValue::toString() and Path::toString() to ::str() for similarity with the STL. 2. Removes all stream insertion support for sys::Path, forcing clients to call .str(). 3. Removes a use of Config/alloca.h from bugpoint, using smallvector instead. 4. Weans llvm-db off <iostream> sys::Path really needs to be gutted, but I don't have the desire to do it at this point. llvm-svn: 79869
* eliminate the "Value" printing methods that print to a std::ostream.Chris Lattner2009-08-231-9/+8
| | | | | | This required converting a bunch of stuff off DOUT and other cleanups. llvm-svn: 79819
* Link NamedMDNodes.Devang Patel2009-08-111-0/+19
| | | | llvm-svn: 78696
* Link metadata.Devang Patel2009-08-111-0/+8
| | | | llvm-svn: 78652
* Move a few more APIs back to 2.5 forms. The only remaining ones left to ↵Owen Anderson2009-07-311-4/+2
| | | | | | | | change back are metadata related, which I'm waiting on to avoid conflicting with Devang. llvm-svn: 77721
* Move types back to the 2.5 API.Owen Anderson2009-07-291-1/+1
| | | | llvm-svn: 77516
* Remove now unused Context variables.Benjamin Kramer2009-07-291-4/+0
| | | | llvm-svn: 77495
* Move ConstantExpr to 2.5 API.Owen Anderson2009-07-291-8/+8
| | | | llvm-svn: 77494
* Return ConstantVector to 2.5 API.Owen Anderson2009-07-281-1/+1
| | | | llvm-svn: 77366
* Change ConstantArray to 2.5 API.Owen Anderson2009-07-281-2/+2
| | | | llvm-svn: 77347
* 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
OpenPOWER on IntegriCloud