aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Linker
Commit message (Collapse)AuthorAgeFilesLines
* For PR495:Reid Spencer2005-07-072-18/+26
| | | | | | | | | | | | | | | | | | | | | | Get rid of the difference between file paths and directory paths. The Path class now simply stores a path that can refer to either a file or a directory. This required various changes in the implementation and interface of the class with the corresponding impact to its users. Doxygen comments were also updated to reflect these changes. Interface changes are: appendDirectory -> appendComponent appendFile -> appendComponent elideDirectory -> eraseComponent elideFile -> eraseComponent elideSuffix -> eraseSuffix renameFile -> rename setDirectory -> set setFile -> set Changes pass Dejagnu and llvm-test/SingleSource tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22349 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR495:Reid Spencer2005-07-072-2/+2
| | | | | | | | | | | | Change interface to Path class: readable -> canRead writable -> canWrite executable -> canExecute More (incremental) changes coming to close 495. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22345 91177308-0d34-0410-b5e6-96231b3b80d8
* Preserve CC's when linking modulesChris Lattner2005-05-091-0/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21799 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove trailing whitespaceMisha Brukman2005-04-214-56/+56
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21422 91177308-0d34-0410-b5e6-96231b3b80d8
* fix some 80 column violationsChris Lattner2005-03-151-4/+11
| | | | | | | Add support for programs that define main in a .a file, such as f2c'd programs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20631 91177308-0d34-0410-b5e6-96231b3b80d8
* consolidate LinkFiles into LinkItems, use lib_* iterators.Chris Lattner2005-03-152-85/+61
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20630 91177308-0d34-0410-b5e6-96231b3b80d8
* consolidate LinkLibraries into LinkItemsChris Lattner2005-03-152-76/+57
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20629 91177308-0d34-0410-b5e6-96231b3b80d8
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-152-8/+8
| | | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20597 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for ".so" files compiled with LLVM which contain LLVM bytecode.Chris Lattner2005-02-192-3/+11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20253 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate silly warnings from the linker of the form:Chris Lattner2005-02-191-12/+0
| | | | | | | | | WARNING: Type conflict between types named 'union.._604.'. Src=' %union.._604.'. Dest=' %union.._604.' git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20252 91177308-0d34-0410-b5e6-96231b3b80d8
* Minor cleanup. No need to explicitly tell the compiler the template arguments.Chris Lattner2005-02-131-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20153 91177308-0d34-0410-b5e6-96231b3b80d8
* Print something useful for gccld -v with an archive.Chris Lattner2005-02-131-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20148 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow globals to be of different const'nesses when we link.Chris Lattner2005-02-121-8/+2
| | | | | | | | This finally resolves PR502, PR450, and test/Regression/Linker/2005-02-12-ConstantGlobals{,-2}.ll correctly git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20135 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove un-needed #includes.Reid Spencer2004-12-201-3/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19061 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a compile error. config.h is now needed because DataTypes.h doesn'tReid Spencer2004-12-161-0/+1
| | | | | | | include it any more. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18993 91177308-0d34-0410-b5e6-96231b3b80d8
* * Fix header block.Reid Spencer2004-12-131-8/+8
| | | | | | | | | * Fix loop style per standards * Don't create a new Module when the Linker's module is released. * Add/fix function comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18871 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing space in a comment.Reid Spencer2004-12-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18870 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix header and function comments.Reid Spencer2004-12-131-14/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18867 91177308-0d34-0410-b5e6-96231b3b80d8
* This file contains basic Linker facilities needed by all toolsReid Spencer2004-12-131-0/+166
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18860 91177308-0d34-0410-b5e6-96231b3b80d8
* Make LinkModules a static member functionReid Spencer2004-12-131-1/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18859 91177308-0d34-0410-b5e6-96231b3b80d8
* This file contains only the Linker's library linking supportReid Spencer2004-12-131-0/+70
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18858 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351: \Reid Spencer2004-12-131-122/+12
| | | | | | | | | * Remove redundant static function LinkOneLibrary. \ * Remove unneded #includes \ * Convert FileSupport usage to sys::Path instead git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18857 91177308-0d34-0410-b5e6-96231b3b80d8
* This file contains only the Linker's file linking supportReid Spencer2004-12-131-0/+89
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18856 91177308-0d34-0410-b5e6-96231b3b80d8
* For PR351: \Reid Spencer2004-12-131-284/+32
| | | | | | | | | | * Convert functions to Linker:: methods. \ * Remove unneeded #includes \ * Utilize sys::Path utilities not FileSupport utilities \ * Move File & Library linking functions to other source files git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18855 91177308-0d34-0410-b5e6-96231b3b80d8
* Make sure to link the target-triple as well, so it ends up in the .llvm.bc fileChris Lattner2004-12-101-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18774 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn this error back into a warning, fixing the povray regressionChris Lattner2004-12-081-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18655 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert this disgusting hack, John has a much nicer solutionChris Lattner2004-12-081-23/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18611 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a disgusting hack to work around a libstdc++ issue. This code shouldChris Lattner2004-12-081-0/+23
| | | | | | | be removed when PR400 is resolved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18610 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix PR139: \Reid Spencer2004-12-051-0/+159
| | | | | | | Implement LinkItems and BuildLinkItems interfaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18547 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linkage of mismatched weak globals. This unbreaks 300.twolfChris Lattner2004-12-041-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18494 91177308-0d34-0410-b5e6-96231b3b80d8
* Significantly rework linker support for global variables, allowing it toChris Lattner2004-12-031-84/+101
| | | | | | | | | | correctly link globals whose LLVM types do not match. This fixes several of the F2C SPEC FP benchmarks, which were failing this due to the implementation of common blocks used by f2c. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18465 91177308-0d34-0410-b5e6-96231b3b80d8
* PR466:Reid Spencer2004-12-021-41/+54
| | | | | | | | | | | | | | | | | * Make the linker find lib*.bca files now instead of lib*.bc since those are what the makefiles now generate for bytecode archives. * Make sure the linker only links archives when LinkLibraries is called. Previously if it found a lib*.bc file and that file was a bytecode file, it would link in the entire bytecode. This could make -lc -lc fail with duplicate symbols error but it shouldn't as searching multiple libraries, even the same one more than once, is permitted. * Now that the above problems are corrected, implement the dependent libs feature. After the module is linked with all specified libraries, the LinkLibraries function will obtain the set of dependent libraries from the linked modules and attemp to find and link against those libraries. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18428 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert version 1.39. It breaks the ordering of the library processing.Reid Spencer2004-11-301-8/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18399 91177308-0d34-0410-b5e6-96231b3b80d8
* Shared library extension is now in LTDL_SHLIB_EXTReid Spencer2004-11-291-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18353 91177308-0d34-0410-b5e6-96231b3b80d8
* Implement dependent library linking. It is no longer required that -lstdc++Reid Spencer2004-11-251-1/+8
| | | | | | | | -lstdsup++ no -lc be passed on the command line to llvm linkers if the progam being linked was compiled with the C/C++ Front End or Stacker. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18243 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove blank comment lines for uniformity.Reid Spencer2004-11-251-25/+2
| | | | | | | Make sure lines don't exceed 80 cols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18242 91177308-0d34-0410-b5e6-96231b3b80d8
* Eliminate unsightly ;;Reid Spencer2004-11-191-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17979 91177308-0d34-0410-b5e6-96231b3b80d8
* Reduce the amount of work in LinkInArchive by not searching the archive forReid Spencer2004-11-191-10/+36
| | | | | | | symbols it has already identified as not defining. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17975 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't increment a dead iteratorChris Lattner2004-11-161-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17904 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify the remapper by only needing one map, since the body of the functionsChris Lattner2004-11-161-43/+31
| | | | | | | being linked do not need to be remapped any longer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17900 91177308-0d34-0410-b5e6-96231b3b80d8
* Take advantage of the fact that we are allowed to clobber the input moduleChris Lattner2004-11-161-26/+8
| | | | | | | | | | | | | | | by splicing function bodies from the src module to the destination module. This speeds up linking quite a bit, e.g. gccld time on 176.gcc from 26s -> 20s when forming the .rbc file, with a profile build. One of the really strange but cool effects of this patch is that it speeds up the optimizers as well, from 12s -> 10.7s, presumably because of better locality??? In any case, this is just a first step. We can trivially get rid of the LocalMap now and do other simplifications. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17893 91177308-0d34-0410-b5e6-96231b3b80d8
* Per code review:\Reid Spencer2004-11-161-11/+13
| | | | | | | | * Adjust indentation\ * Ensure memory do not leak if exceptions happen (std::auto_ptr use) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17885 91177308-0d34-0410-b5e6-96231b3b80d8
* The second arg may be clobbered by this functionChris Lattner2004-11-161-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17880 91177308-0d34-0410-b5e6-96231b3b80d8
* use an autoptrChris Lattner2004-11-161-7/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17875 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a forgotten debug output line.Reid Spencer2004-11-141-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17810 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker.h moved to include/llvm from include/llvm/Support.Reid Spencer2004-11-141-2/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17807 91177308-0d34-0410-b5e6-96231b3b80d8
* Linker.h has a new home.Reid Spencer2004-11-141-1/+0
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17801 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't bother with a re-linked library, ensure archive library is built.Reid Spencer2004-11-141-0/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17773 91177308-0d34-0410-b5e6-96231b3b80d8
* *Adjust prototypes for public interface. *Rewrite LinkInArchive to use ↵Reid Spencer2004-11-141-65/+41
| | | | | | symbol tables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17772 91177308-0d34-0410-b5e6-96231b3b80d8
* Makefile for lib/LinkerReid Spencer2004-11-121-0/+13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17695 91177308-0d34-0410-b5e6-96231b3b80d8