summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-141-2/+2
| | | | llvm-svn: 111082
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-211-8/+4
| | | | | | for creating and populating NamedMDNodes. llvm-svn: 109061
* Revert r107205 and r107207.Bill Wendling2010-06-291-3/+0
| | | | llvm-svn: 107215
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-291-0/+3
| | | | | | | | | | | | | | | | | | | metadata types which should be marked as "weak", but which the linker will remove upon final linkage. For example, the "objc_msgSend_fixup_alloc" symbol is defined like this: .globl l_objc_msgSend_fixup_alloc .weak_definition l_objc_msgSend_fixup_alloc .section __DATA, __objc_msgrefs, coalesced .align 3 l_objc_msgSend_fixup_alloc: .quad _objc_msgSend_fixup .quad L_OBJC_METH_VAR_NAME_1 This is different from the "linker_private" linkage type, because it can't have the metadata defined with ".weak_definition". llvm-svn: 107205
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-161-1/+1
| | | | | | methods to try to have the type predicates be more logically positioned. llvm-svn: 96349
* Linker should not remap null operands of metadataVictor Hernandez2010-02-061-2/+6
| | | | llvm-svn: 95468
* Need to recurse for all operands of function-local metadata; and handle ↵Victor Hernandez2010-01-271-6/+3
| | | | | | Instructions (which map to themselves) llvm-svn: 94691
* merge two ifsChris Lattner2010-01-271-3/+1
| | | | llvm-svn: 94650
* Linker needs to do deep-copy of function-local metadata to update references ↵Victor Hernandez2010-01-271-1/+13
| | | | | | to function arguments llvm-svn: 94632
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-221-1/+1
| | | | llvm-svn: 94243
* Fixed linking of modules containing aliases to constant bitcasts. Existing ↵David Chisnall2010-01-091-5/+16
| | | | | | | | behaviour first tried to replace the aliases with the global that they aliased (rather than the bitcast), causing a crash on an assert because the types didn't match. When this was fixed, it then did the same thing creating the new alias (creating an alias with a different type to its aliasee). Linking modules containing aliases to GEPs is still not quite right. GEPs that are equivalent to bitcasts will be replaced by bitcasts, GEPs that are not will just break. Aliases to GEPs that are not equivalent to bitcasts are horribly broken anyway (it might be worth adding an assert when creating the alias to prevent these being created; they just cause problems later). llvm-svn: 93052
* Change errs() to dbgs().David Greene2010-01-051-6/+7
| | | | llvm-svn: 92628
* rename "elements" of metadata to "operands". "Elements" areChris Lattner2009-12-311-2/+2
| | | | | | | things that occur in types. "operands" are things that occur in values. llvm-svn: 92322
* Remove dead store.Bill Wendling2009-12-281-1/+0
| | | | llvm-svn: 92192
* implement linker support for BlockAddress.Chris Lattner2009-11-011-17/+13
| | | | llvm-svn: 85700
* 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
OpenPOWER on IntegriCloud