summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkArchives.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Kill ModuleProvider and ghost linkage by inverting the relationship betweenJeffrey Yasskin2010-01-271-11/+10
| | | | | | | | | | | | | | | | | | | | | 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. llvm-svn: 94686
* random tidyChris Lattner2009-11-091-2/+1
| | | | llvm-svn: 86511
* Prune #includes from llvm/Linker.h and llvm/System/Path.h,Chris Lattner2009-08-231-6/+5
| | | | | | | | | | | | | | | | | | 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
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-1/+1
| | | | | | | | | | LLVMContext through a lot of the bitcode reader and ASM parser APIs, as well as supporting it in all of the tools. Patches for Clang and LLVM-GCC to follow. llvm-svn: 74614
* Add the private linkage.Rafael Espindola2009-01-151-2/+2
| | | | llvm-svn: 62279
* Fix thinko: alias always defines new symbol. Even is aliasee itself is ↵Anton Korobeynikov2008-03-111-7/+2
| | | | | | undefined. llvm-svn: 48203
* Properly populate lists of defined/undefined symbols in presence of aliasesAnton Korobeynikov2008-03-041-1/+11
| | | | llvm-svn: 47900
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Report an error if one occurs in releaseModule.Reid Spencer2007-07-221-0/+3
| | | | llvm-svn: 40405
* Here is the bulk of the sanitizing.Gabor Greif2007-07-051-1/+1
| | | | | | Almost all occurrences of "bytecode" in the sources have been eliminated. llvm-svn: 37913
* switch this to bitcode instead of bytecodeChris Lattner2007-05-061-3/+3
| | | | llvm-svn: 36867
* add bitcode supportChris Lattner2007-05-061-1/+0
| | | | llvm-svn: 36855
* If an archive is not recognized as an LLVM bytecode archive then declareReid Spencer2007-04-301-1/+6
| | | | | | | | | that it is native so that the linker will pass it on downstream. This avoids a problem where the native link line fails because there is both a .so and a .a file. The .a file gets processed as bytecode and then dropped from the command line. llvm-svn: 36584
* For PR411:Reid Spencer2007-02-051-1/+1
| | | | | | | | Adjust to changes in Module interface: getMainFunction() -> getFunction("main") getNamedFunction(X) -> getFunction(X) llvm-svn: 33922
* For PR1136: Rename GlobalVariable::isExternal as isDeclaration to avoidReid Spencer2007-01-301-3/+3
| | | | | | confusion with external linkage types. llvm-svn: 33663
* Remvoe a do-nothing else block.Reid Spencer2006-11-111-6/+1
| | | | llvm-svn: 31687
* For PR998:Reid Spencer2006-11-111-11/+24
| | | | | | | | Fix an infinite loop in the Linker and a few other assorted link problems. Patch contributed by Scott Michel. Thanks, Scott! llvm-svn: 31680
* For PR786:Reid Spencer2006-11-021-14/+0
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Adding dllimport, dllexport and external weak linkage types.Anton Korobeynikov2006-09-141-2/+8
| | | | | | | | | DLL* linkages got full (I hope) codegeneration support in C & both x86 assembler backends. External weak linkage added for future use, we don't provide any codegeneration, etc. support for it. llvm-svn: 30374
* Finish removal of EH usage from the Archive library. The REQUIRES_EH flagReid Spencer2006-07-071-1/+3
| | | | | | | in lib/Bytecode/Archive/Makefile is now removed. One small step closer to a smaller LLVM. llvm-svn: 29067
* Remove trailing whitespaceMisha Brukman2005-04-211-15/+15
| | | | llvm-svn: 21422
* 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. llvm-svn: 20631
* This mega patch converts us from using Function::a{iterator|begin|end} toChris Lattner2005-03-151-2/+2
| | | | | | | | using Function::arg_{iterator|begin|end}. Likewise Module::g* -> Module::global_*. This patch is contributed by Gabor Greif, thanks! llvm-svn: 20597
* Minor cleanup. No need to explicitly tell the compiler the template arguments.Chris Lattner2005-02-131-3/+2
| | | | llvm-svn: 20153
* Print something useful for gccld -v with an archive.Chris Lattner2005-02-131-0/+2
| | | | llvm-svn: 20148
* Remove un-needed #includes.Reid Spencer2004-12-201-3/+1
| | | | llvm-svn: 19061
* 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 llvm-svn: 18855
* 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. llvm-svn: 18428
* Revert version 1.39. It breaks the ordering of the library processing.Reid Spencer2004-11-301-8/+1
| | | | llvm-svn: 18399
* Shared library extension is now in LTDL_SHLIB_EXTReid Spencer2004-11-291-2/+2
| | | | llvm-svn: 18353
* 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. llvm-svn: 18243
* Eliminate unsightly ;;Reid Spencer2004-11-191-1/+1
| | | | llvm-svn: 17979
* 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. llvm-svn: 17975
* Per code review:\Reid Spencer2004-11-161-11/+13
| | | | | | | * Adjust indentation\ * Ensure memory do not leak if exceptions happen (std::auto_ptr use) llvm-svn: 17885
* use an autoptrChris Lattner2004-11-161-7/+3
| | | | llvm-svn: 17875
* Remove a forgotten debug output line.Reid Spencer2004-11-141-1/+0
| | | | llvm-svn: 17810
* Linker.h has a new home.Reid Spencer2004-11-141-1/+0
| | | | llvm-svn: 17801
* *Adjust prototypes for public interface. *Rewrite LinkInArchive to use ↵Reid Spencer2004-11-141-65/+41
| | | | | | symbol tables. llvm-svn: 17772
* This file originated in tools/gccld/Linker.cpp but now lives inReid Spencer2004-11-121-0/+422
lib/Linker/LinkArchives.cpp llvm-svn: 17693
OpenPOWER on IntegriCloud