Commit Graph

72 Commits

Author SHA1 Message Date
Chris Lattner 28689ff2d0 Use LINK_COMPONENTS to specify *components* to link against instead of
using USED_LIBS to specify *libraries* to link against.

llvm-svn: 30090
2006-09-04 05:59:09 +00:00
Anton Korobeynikov 6c6a70f999 - Fixed broken Win32 build
- Removed warning about clobbered parameter in Bytecode/Reader

llvm-svn: 30026
2006-09-01 20:35:17 +00:00
Chris Lattner d8c0bfb9a1 eliminate only use of FilteredPassNameParser
llvm-svn: 29916
2006-08-27 22:07:43 +00:00
Reid Spencer 879ed5ab9c For PR797:
Eliminate exception throwing from Path::renamePathOnDisk and adjust its
users correspondingly.

llvm-svn: 29843
2006-08-23 07:30:48 +00:00
Reid Spencer 8db844241b For PR797:
Remove exceptions from the Path::create*OnDisk methods. Update their users
to handle error messages via arguments and result codes.

llvm-svn: 29840
2006-08-23 00:39:35 +00:00
Reid Spencer 9d2f19c7e4 For PR797:
Change the Path::make*OnDisk methods exception free and adjust their usage.

llvm-svn: 29836
2006-08-22 23:27:23 +00:00
Reid Spencer 944645af44 For PR797:
Adjust usage of the ExecuteAndWait function to use the last argument which
is the ErrMsg string. This is necessitated because this function no longer
throws exceptions on error.

llvm-svn: 29791
2006-08-21 06:04:45 +00:00
Reid Spencer 54aa04f972 Make sure the verify pass gets run after the user's loaded passes as well
when the verify-each option is given.

llvm-svn: 29783
2006-08-20 20:54:38 +00:00
Reid Spencer f2c6a5da97 Rename the -verify option to be -verify-each so that it doesn't conflict
with the -verify pass option. It is also more accurate in that this option
causes a verify option to be run after every pass.

llvm-svn: 29782
2006-08-20 20:48:44 +00:00
Reid Spencer 7ed9bb4b47 Convert llvm-ld to use the PluginLoader like opt instead of having its
one-off (and broken) RunOptimizations function. Also, run some cleanup
passes after the user's loaded passes run. This make sure to clean up
any cruft left around by thos passes.

This patch was inspired by a patch submitted by Bram Adams.

llvm-svn: 29781
2006-08-20 19:18:36 +00:00
Chris Lattner 05a8970245 Tools require EH for their top-level try blocks.
llvm-svn: 29035
2006-07-07 00:46:19 +00:00
Devang Patel 039215b020 Fix cut-n-pasto in comments.
llvm-svn: 28928
2006-06-27 18:07:29 +00:00
Chris Lattner 16cf81306e Don't pass target name into TargetData anymore, it is never used or needed.
llvm-svn: 28831
2006-06-16 18:23:49 +00:00
Reid Spencer ed95105b45 Shorten a value description so --help out isn't so wide.
llvm-svn: 28721
2006-06-07 23:07:51 +00:00
Reid Spencer 5113dc5cfe For PR780:
1. Add #includes to LinkAllVMCore.h to get Mangler.o and InlineAsm.o
2. Make Mangler.h and InlineAsm.h use the macros to ensure linkage
3. Make each of the tools with --load options include LinkAllVMCore.h
This should be the last set of changes for this bug and 800.

llvm-svn: 28719
2006-06-07 23:03:13 +00:00
Chris Lattner e2e2492d8a Fix a -pedantic warning
llvm-svn: 28670
2006-06-02 22:11:06 +00:00
Reid Spencer a647c7ff42 Use archive libraries instead of object files for VMCore, BCReader,
BCWriter, and bzip2 libraries. Adjust the various makefiles to accommodate
these changes. This was done to speed up link times.

llvm-svn: 28610
2006-06-01 01:30:27 +00:00
Chris Lattner 44f90c93e6 Delete memory allocated by CopyEnv
llvm-svn: 28288
2006-05-14 18:38:13 +00:00
Reid Spencer 8e5da55b6d Make sure command line options are parsed before we try to add the LibPath
(-L options) to TheLinker. Problem noticed by Wink Saville.

llvm-svn: 26571
2006-03-06 06:38:19 +00:00
Reid Spencer 5995c57574 For PR521:
With these patches we implement the ability for the Linker library to
keep track of which libraries were actually bytecode files (not archives)
and cause their users to remove such files from the list of libraries to
pass to the native linker.

llvm-svn: 25169
2006-01-10 03:14:40 +00:00
Reid Spencer 41e1b6fed0 Implement PR512:
This patch adds a -post-link-opts option to llvm-ld which allows an arbitrary
program to optimize bytecode after linking. The program is passed two file
names. The first is the input (linked bytecode) the second is where it must
place its output (presumably after optimizing). If the output file is bytecode,
it is used as a substitute for the input. This will allow things like poolalloc
to be written as a separate program instead of a loadable module or built into
LLVM.

llvm-svn: 24893
2005-12-21 05:03:23 +00:00
Reid Spencer 6796b48e51 Adjust the constructor to the Linker class to take an argument that names
the module being constructed. This is used to correctly name the module.
Previously the name of the linker tool was used which produces confusing
output when the module identifier is used in an error message.

llvm-svn: 24699
2005-12-13 20:00:37 +00:00
John Criswell fe5f33b120 Move some constant folding code shared by Analysis and Transform passes
into the LLVMAnalysis library.
This allows LLVMTranform and LLVMTransformUtils to be archives and linked
with LLVMAnalysis.a, which provides any missing definitions.

llvm-svn: 24036
2005-10-27 15:54:34 +00:00
John Criswell 94b7bea733 1. Remove libraries no longer created from the list of libraries linked into the
SparcV9 JIT.
2. Make LLVMTransformUtils a relinked object file and always link it before
   LLVMAnalysis.a.  These two libraries have circular dependencies on each
   other which creates problem when building the SparcV9 JIT.  This change
   fixes the dependency on all platforms problems with a minimum of fuss.

llvm-svn: 24023
2005-10-26 20:35:13 +00:00
Chris Lattner 727671a3dc Fix PR637
llvm-svn: 23784
2005-10-18 06:29:43 +00:00
Reid Spencer af48d8643d Final Changes For PR495:
This chagne just renames some sys::Path methods to ensure they are not
misused. The Path documentation now divides methods into two dimensions:
Path/Disk and accessor/mutator. Path accessors and mutators only operate
on the Path object itself without making any disk accesses. Disk accessors
and mutators will also access or modify the file system. Because of the
potentially destructive nature of disk mutators, it was decided that all
such methods should end in the work "Disk" to ensure the user recognizes
that the change will occur on the file system. This patch makes that
change. The method name changes are:

makeReadable        -> makeReadableOnDisk
makeWriteable       -> makeWriteableOnDisk
makeExecutable      -> makeExecutableOnDisk
setStatusInfo       -> setStatusInfoOnDisk
createDirectory     -> createDirectoryOnDisk
createFile          -> createFileOnDisk
createTemporaryFile -> createTemporaryFileOnDisk
destroy             -> eraseFromDisk
rename              -> renamePathOnDisk

These changes pass the Linux Deja Gnu tests.

llvm-svn: 22354
2005-07-08 03:08:58 +00:00
Reid Spencer c9c0473fa5 For PR495:
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.

llvm-svn: 22349
2005-07-07 23:21:43 +00:00
Misha Brukman 650ba8eb56 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner 672fe7267b The first argument to ExecuteAndWait should be the program name, but pointed
out by Markus F.X.J. Oberhumer.

llvm-svn: 21211
2005-04-10 20:59:38 +00:00
Chris Lattner 9db0eccc42 Conform to the documented interface by null terminating argument lists!
llvm-svn: 20167
2005-02-13 23:10:45 +00:00
Jeff Cohen c8f1f4bc8e Use binary mode for reading/writing bytecode files
llvm-svn: 19751
2005-01-22 17:36:17 +00:00
Reid Spencer 996ec72d48 For PR351:
* Place a try/catch block around the entire tool to Make sure std::string
  exceptions are caught and printed before exiting the tool.
* Make sure we catch unhandled exceptions at the top level so that we don't
  abort with a useless message but indicate than an unhandled exception was
  generated.

llvm-svn: 19192
2004-12-30 05:36:08 +00:00
Reid Spencer d94c5f8cc9 Correct compilation for Cygwin. FindExecutable now returns a sys::Path.
llvm-svn: 19109
2004-12-22 13:50:17 +00:00
Misha Brukman 8295ac7098 Fix the Win32 build
llvm-svn: 19088
2004-12-22 01:37:33 +00:00
Reid Spencer fc195422a5 Make parameters to CopyFile use explicit instantiation of sys::Path.
llvm-svn: 19086
2004-12-22 01:26:48 +00:00
Reid Spencer 766ad0b77f For PR351:
* Support changes in sys::Program::ExecuteAndWait interface

llvm-svn: 19044
2004-12-19 18:00:56 +00:00
Reid Spencer 5ababc6f33 sys::CopyFile returns void and throws an exception on error which will be
caught by llvm-ld's main function.

llvm-svn: 19030
2004-12-18 06:54:21 +00:00
Reid Spencer 16ce83c3a6 The CopyFile function got moved into the sys namespace.
llvm-svn: 19026
2004-12-18 00:19:32 +00:00
Reid Spencer 584cb0a8c1 For PR351:
* removeFile() -> sys::Path::destroyFile()
* remove extraneous toString() calls
* convert local variables representing path names from std::string to
  sys::Path
* Use sys::Path objects with FileRemove instead of std::string
* Use sys::Path methods for construction of path names

llvm-svn: 19001
2004-12-16 23:04:20 +00:00
Reid Spencer eedafda7bb For PR351:
* Change ExecWait calls to sys::Program::ExecuteAndWait
* Convert to use sys::Path where it makes sense

llvm-svn: 18929
2004-12-14 04:20:08 +00:00
Reid Spencer 79dc8b79bb For PR351:
Adjust to interface change for FindExecutable.

llvm-svn: 18920
2004-12-13 23:44:23 +00:00
Reid Spencer 249eb144d9 For PR351:
Replace MakeFileReadable and MakeFileExecutable (from FileUtilities) with
sys::Path::makeReadable and sys::Path:makeExecutable, respectively.

llvm-svn: 18909
2004-12-13 20:03:02 +00:00
Reid Spencer 0afe178f21 Make the loop termination condition clear when building the set of items to
pass to the Linker::LinkInItems function.

llvm-svn: 18894
2004-12-13 17:18:19 +00:00
Reid Spencer 8d206908d8 Convert to use new Linker class interface
llvm-svn: 18864
2004-12-13 03:01:14 +00:00
Reid Spencer d58e09a275 Revert the last patch. We really do need SimplyCFG.
llvm-svn: 18787
2004-12-11 03:03:54 +00:00
Reid Spencer eef4420578 Remove this pass as its no longer needed.
llvm-svn: 18783
2004-12-10 22:55:35 +00:00
Reid Spencer 359df30f3d When -link-as-library, add -l options to Module's deplibs
llvm-svn: 18617
2004-12-08 05:17:40 +00:00
Reid Spencer ef96665753 Fix PR139:\
When not linking as a library, use LinkItems to retain command line order of \
linking, otherwise use LinkFiles

llvm-svn: 18549
2004-12-05 19:15:29 +00:00
Chris Lattner 99a7c3d26f Adjust to change in pass name
llvm-svn: 18442
2004-12-02 21:27:35 +00:00
Reid Spencer d3f2e95e6c Add LLVMbzip2 library, now required.
llvm-svn: 18255
2004-11-25 20:22:06 +00:00