summaryrefslogtreecommitdiff
path: root/lib/Linker
Commit message (Collapse)AuthorAge
...
* Allow unnamed_addr on declarations.Rafael Espindola2011-01-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123529 91177308-0d34-0410-b5e6-96231b3b80d8
* Keep unnamed_addr when linking.Rafael Espindola2011-01-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123364 91177308-0d34-0410-b5e6-96231b3b80d8
* Revamp the ValueMapper interfaces in a couple ways:Chris Lattner2011-01-08
| | | | | | | | | | | | | | | | | | 1. Take a flags argument instead of a bool. This makes it more clear to the reader what it is used for. 2. Add a flag that says that "remapping a value not in the map is ok". 3. Reimplement MapValue to share a bunch of code and be a lot more efficient. For lookup failures, don't drop null values into the map. 4. Using the new flag a bunch of code can vaporize in LinkModules and LoopUnswitch, kill it. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123058 91177308-0d34-0410-b5e6-96231b3b80d8
* include the module identifier when emitting this warning, PR8865.Chris Lattner2010-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122637 91177308-0d34-0410-b5e6-96231b3b80d8
* print the right string, thanks for Frits for noticing.Chris Lattner2010-12-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122636 91177308-0d34-0410-b5e6-96231b3b80d8
* improve warning message to at least say what the triples are.Chris Lattner2010-12-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122632 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.Michael J. Spencer2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122158 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.Michael J. Spencer2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122157 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r122143 through r122140, which collectively broke the LLVMC tests onOwen Anderson2010-12-18
| | | | | | | the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122149 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix whitespace.Michael J. Spencer2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122142 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/PathV1: Deprecate get{Basename,Dirname,Suffix}.Michael J. Spencer2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122141 91177308-0d34-0410-b5e6-96231b3b80d8
* MemoryBuffer now return an error_code and returns a OwningPtr<MemoryBuffer> ↵Michael J. Spencer2010-12-16
| | | | | | via an out parm. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121958 91177308-0d34-0410-b5e6-96231b3b80d8
* Support/MemoryBuffer: Replace all uses of std::string *ErrMsg with ↵Michael J. Spencer2010-12-09
| | | | | | error_code &ec. And fix clients. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121379 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* GetDLLSuffix: Remove the leading dot from LTDL_SHLIB_EXT.Mikhail Glushenkov2010-11-02
| | | | | | This allows using GetDLLSuffix() with appendSuffix(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118051 91177308-0d34-0410-b5e6-96231b3b80d8
* Trailing whitespace.Mikhail Glushenkov2010-11-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118050 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR8300 by remembering to keep the bitcast in all cases.Rafael Espindola2010-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@116788 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "RequiresUnique" patch. This should be handled at a lower level.Bill Wendling2010-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115827 91177308-0d34-0410-b5e6-96231b3b80d8
* Change RequiresMerge to RequiresUnique. It's a better description of what thisBill Wendling2010-10-06
| | | | | | | | | fix is trying to accomplish. This code could still use some polishing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115759 91177308-0d34-0410-b5e6-96231b3b80d8
* If the destination module all ready has a copy of the global coming from theBill Wendling2010-10-06
| | | | | | | | | | | | | | source module *and* it must be merged (instead of simply replaced or appended to), then merge instead of replacing or adding another global. The ObjC __image_info section was being appended to because of this failure. This caused a crash because the linker expects the image info section to be a specific size. <rdar://problem/8198537> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115753 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally."Michael J. Spencer2010-09-13
| | | | | | | | | | This reverts commit r113632 Conflicts: cmake/modules/AddLLVM.cmake git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113819 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Get rid of LLVMLibDeps.cmake and export the libraries normally.Michael J. Spencer2010-09-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113632 91177308-0d34-0410-b5e6-96231b3b80d8
* dead code patrolChris Lattner2010-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112713 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r112091 and r111922, support for metadata linking, with aDan Gohman2010-08-26
| | | | | | | | | | | | | | | fix: add a flag to MapValue and friends which indicates whether any module-level mappings are being made. In the common case of inlining, no module-level mappings are needed, so MapValue doesn't need to examine non-function-local metadata, which can be very expensive in the case of a large module with really deep metadata (e.g. a large C++ program compiled with -g). This flag is a little awkward; perhaps eventually it can be moved into the ClonedCodeInfo class. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112190 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r112091, "Remap metadata attached to instructions when remappingDaniel Dunbar2010-08-26
| | | | | | individual ...", which depends on r111922, which I am reverting. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112157 91177308-0d34-0410-b5e6-96231b3b80d8
* Remap metadata attached to instructions when remapping individualDan Gohman2010-08-25
| | | | | | | instructions, not when remapping modules. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112091 91177308-0d34-0410-b5e6-96231b3b80d8
* - Add the LinkerPrivateWeakDefAutoLinkage to the Ada bindings.Bill Wendling2010-08-24
| | | | | | | - Support the LinkerWeak*Linkage types in llvm-nm and in LinkModules.cpp. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111952 91177308-0d34-0410-b5e6-96231b3b80d8
* Link NamedMDNodes after linking GlobalValues, so that MDNodesDan Gohman2010-08-24
| | | | | | | which reference GlobalValues are properly remapped. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111949 91177308-0d34-0410-b5e6-96231b3b80d8
* When linking NamedMDNodes, remap their operands.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111948 91177308-0d34-0410-b5e6-96231b3b80d8
* Use MapValue in the Linker instead of having a private functionDan Gohman2010-08-24
| | | | | | | | | which does the same thing. This eliminates redundant code and handles MDNodes better. MDNode linking still doesn't fully work yet though. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111941 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't cast away qualifiers with C-style casts.Dan Gohman2010-08-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111933 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111082. No warnings for this common pattern.Argyrios Kyrtzidis2010-08-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111102 91177308-0d34-0410-b5e6-96231b3b80d8
* Add ATTRIBUTE_UNUSED to methods that are not supposed to be used.Argyrios Kyrtzidis2010-08-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111082 91177308-0d34-0410-b5e6-96231b3b80d8
* Make NamedMDNode not be a subclass of Value, and simplify the interfaceDan Gohman2010-07-21
| | | | | | | for creating and populating NamedMDNodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109061 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r107205 and r107207.Bill Wendling2010-06-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107215 91177308-0d34-0410-b5e6-96231b3b80d8
* Introducing the "linker_weak" linkage type. This will be used for Objective-CBill Wendling2010-06-29
| | | | | | | | | | | | | | | | | | | | 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". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107205 91177308-0d34-0410-b5e6-96231b3b80d8
* Add basic error checking to MemoryBuffer::getSTDIN.Dan Gohman2010-05-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104855 91177308-0d34-0410-b5e6-96231b3b80d8
* Use the return value of getMagicNumber instead of using aDan Gohman2010-05-27
| | | | | | | separate canRead() call. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104853 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce isOpaqueTy and use it rather than isa<OpaqueType>. Also, move someDuncan Sands2010-02-16
| | | | | | | methods to try to have the type predicates be more logically positioned. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96349 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker should not remap null operands of metadataVictor Hernandez2010-02-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95468 91177308-0d34-0410-b5e6-96231b3b80d8
* Need to recurse for all operands of function-local metadata; and handle ↵Victor Hernandez2010-01-27
| | | | | | Instructions (which map to themselves) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94691 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-27
| | | | | | | | | | | | | | | | | | | | | | Modules and ModuleProviders. Because the "ModuleProvider" simply materializes GlobalValues now, and doesn't provide modules, it's renamed to "GVMaterializer". Code that used to need a ModuleProvider to materialize Functions can now materialize the Functions directly. Functions no longer use a magic linkage to record that they're materializable; they simply ask the GVMaterializer. Because the C ABI must never change, we can't remove LLVMModuleProviderRef or the functions that refer to it. Instead, because Module now exposes the same functionality ModuleProvider used to, we store a Module* in any LLVMModuleProviderRef and translate in the wrapper methods. The bindings to other languages still use the ModuleProvider concept. It would probably be worth some time to update them to follow the C++ more closely, but I don't intend to do it. Fixes http://llvm.org/PR5737 and http://llvm.org/PR5735. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94686 91177308-0d34-0410-b5e6-96231b3b80d8
* merge two ifsChris Lattner2010-01-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94650 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker needs to do deep-copy of function-local metadata to update references ↵Victor Hernandez2010-01-27
| | | | | | to function arguments git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94632 91177308-0d34-0410-b5e6-96231b3b80d8
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove MetadataBase class because it is not adding significant value.Devang Patel2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94243 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-22
| | | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed linking of modules containing aliases to constant bitcasts. Existing ↵David Chisnall2010-01-09
| | | | | | | | | | 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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93052 91177308-0d34-0410-b5e6-96231b3b80d8
* Change this back to errs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92674 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92628 91177308-0d34-0410-b5e6-96231b3b80d8