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
* 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
-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
Move include/Config and include/Support into include/llvm/Config,
include/llvm/ADT and include/llvm/Support. From here on out, all LLVM
public header files must be under include/llvm/.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16137 91177308-0d34-0410-b5e6-96231b3b80d8
to reduce the inter-file interface in the gccld tool and gets some
uninteresting code out of gccld.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13942 91177308-0d34-0410-b5e6-96231b3b80d8
that defines the symbol "main." This is a hack that ensures that programs
that place their main function in a library and then link it in
(i.e. Apache 2.x) get their main function linked in.
There is probably a more correct way to do this, but this works for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10594 91177308-0d34-0410-b5e6-96231b3b80d8
* Finegrainify namespacification of Linker.cpp
* If linking a library in fails, do not STOP LINKING IN LIBRARIES AND
CONTINUE ANYWAY! Instead, just output the warning, and keep going. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10249 91177308-0d34-0410-b5e6-96231b3b80d8
print out the module's identifier (which should now contain the name
of both the archive and the module.)
Wrap some lines at 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10039 91177308-0d34-0410-b5e6-96231b3b80d8
Use FileOpenable() instead of FileExists().
Create IsBytecode() predicate -- like IsArchive(), but for bytecode files.
Use IsBytecode() before trying to load any file as a bytecode file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9893 91177308-0d34-0410-b5e6-96231b3b80d8
Make "verbose" output MUCH nicer. Now it tells you when you are linking a
bytecode file, or an archive, and whether it's because you called it by name,
or because you gave it a -l option, and it says "Trying" before it takes
action and prints a message in the past tense afterwards.
Make LinkFiles not skip the first file in Files.
Make LinkFiles warn you if it can't find a file and LLVM_LIB_SEARCH_PATH is
unset.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9747 91177308-0d34-0410-b5e6-96231b3b80d8
2. I think the caller of LinkFiles() should not ignore a true return value.
(If you have a good reason why it ought to, feel free to revert
this. It's just something that's been bugging me for a while.)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8760 91177308-0d34-0410-b5e6-96231b3b80d8
* Removed space between function name and its argument list
* Removed space between '&' and variable name
* Removed empty comment lines: `//'
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8750 91177308-0d34-0410-b5e6-96231b3b80d8
Renamed functions that were all lower-case.
Moved functions from util.cpp into linker.cpp or gccld.cpp.
Removed util.h and created gccld.h.
Refactored the linker functionality in linker.cpp so that it is easier to
follow, easier to modify, and it's library/object file search behavior is
easier to understand and document.
Added code to include library paths when doing native linking, but this
causes problems and is currently #ifdef'd out.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8609 91177308-0d34-0410-b5e6-96231b3b80d8