Dan Gohman
6abbc537f4
Convert more tools code from cerr and cout to errs() and outs().
...
llvm-svn: 76070
2009-07-16 15:30:09 +00:00
Owen Anderson
5c64fb5a80
To simplify the upcoming context-on-type change, switch all command line tools to using the default global context for now.
...
This will let us to hardwire stuff to the global context in the short term while the API is sorted out.
llvm-svn: 75846
2009-07-15 22:16:10 +00:00
Dan Gohman
9ced780576
Add a Force option to raw_fd_ostream to specify whether opening
...
an existing file is considered an error. Convert several tools
to use raw_fd_ostream instead of std::ostream, and to use this
new option instead of doing a manual check.
llvm-svn: 75801
2009-07-15 17:29:42 +00:00
Owen Anderson
cf112e59c3
Hold the LLVMContext by reference rather than by pointer.
...
llvm-svn: 74640
2009-07-01 21:22:36 +00:00
Owen Anderson
81b8dabb53
Add a pointer to the owning LLVMContext to Module. This requires threading 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
2009-07-01 16:58:40 +00:00
Chris Lattner
1b05680d5f
Change various llvm utilities to use PrettyStackTraceProgram in
...
their main routines. This makes the tools print their argc/argv
commands if they crash.
llvm-svn: 66248
2009-03-06 05:34:10 +00:00
Chris Lattner
4869ed1aa7
disable exports from a bunch more tools, those without plugins.
...
llvm-svn: 65558
2009-02-26 19:01:11 +00:00
Daniel Dunbar
d1169ccaf2
Move Print*Pass to use raw_ostream.
...
llvm-svn: 57946
2008-10-22 03:25:22 +00:00
Daniel Dunbar
919ce3c16a
Privatize PrintModulePass and PrintFunctionPass and add
...
createPrintModulePass and createPrintFunctionPass.
- So clients who compile w/o RTTI can use them.
llvm-svn: 57933
2008-10-21 23:33:38 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Chris Lattner
309aeb140b
remove attributions from tools.
...
llvm-svn: 45421
2007-12-29 20:44:31 +00:00
Chris Lattner
11718ad357
remove attributions from tools/utils makefiles.
...
llvm-svn: 45414
2007-12-29 20:07:17 +00:00
Dan Gohman
2e8245a376
Move the space in overview output for commands out of each of the
...
commands and into the common code.
llvm-svn: 42752
2007-10-08 15:45:12 +00:00
Gabor Greif
5f705671e4
Here is the bulk of the sanitizing.
...
Almost all occurrences of "bytecode" in the sources have been eliminated.
llvm-svn: 37913
2007-07-05 17:07:56 +00:00
Chris Lattner
e24a5def42
use the new MemoryBuffer interfaces to simplify error reporting in clients.
...
llvm-svn: 36900
2007-05-06 23:45:49 +00:00
Chris Lattner
5947ecbfbf
switch tools to bitcode instead of bytecode
...
llvm-svn: 36868
2007-05-06 09:29:57 +00:00
Chris Lattner
b1e3362cf6
simplify code
...
llvm-svn: 36837
2007-05-06 04:43:36 +00:00
Chris Lattner
eee1022086
Switch the bitcode reader interface to take a MemoryBuffer instead of knowing
...
anything about disk I/O itself. This greatly simplifies its interface -
eliminating the need for the ReaderWrappers.cpp file.
This adds a new option to llvm-dis (-bitcode) which instructs it to read
the input file as bitcode. Until/unless the bytecode reader is taught to
read from MemoryBuffer, there is no way to handle stdin reading without it.
I don't plan to switch the bytecode reader over, I'd rather delete it :),
so the option will stay around temporarily.
llvm-svn: 36554
2007-04-29 07:54:31 +00:00
Chris Lattner
7a7b428942
don't break reading from stdin
...
llvm-svn: 36336
2007-04-22 06:35:20 +00:00
Chris Lattner
c5bfff06f0
teach llvm-dis to read bitcode files
...
llvm-svn: 36334
2007-04-22 06:31:02 +00:00
Chris Lattner
43d0b955a3
push bytecode decompressor out through APIs. Now the bytecode reader
...
api's look like this:
ModuleProvider *getBytecodeModuleProvider(
const std::string &Filename, ///< Name of file to be read
BCDecompressor_t *BCDC = Compressor::decompressToNewBuffer,
std::string* ErrMsg = 0, ///< Optional error message holder
BytecodeHandler* H = 0 ///< Optional handler for reader events
);
This is ugly, but allows a client to say:
getBytecodeModuleProvider("foo", 0);
If they do this, there is no dependency on the compression libraries, saving
codesize.
llvm-svn: 34012
2007-02-07 21:41:02 +00:00
Chris Lattner
e11a44eff1
add an option for timing bc file reading.
...
llvm-svn: 33977
2007-02-07 04:39:35 +00:00
Bill Wendling
a3246c4272
Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
...
now cerr, cout, and NullStream resp.
llvm-svn: 32298
2006-12-07 01:30:32 +00:00
Chris Lattner
41c5ddb8cb
make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.
...
With this change, I can now move -stats to print when llvm_shutdown is called.
llvm-svn: 32250
2006-12-06 01:18:01 +00:00
Bill Wendling
2477c0ac3d
Convert to using llvm streams instead of iostreams.
...
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Chris Lattner
6a94a2cda7
Switch to using llvm-config to build
...
llvm-svn: 30088
2006-09-04 05:24:16 +00:00
Chris Lattner
9f5a13c5c0
Tools require EH for their top-level try blocks.
...
llvm-svn: 29035
2006-07-07 00:46:19 +00:00
Reid Spencer
94a443bb29
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
Misha Brukman
960a8d47d7
Remove trailing whitespace
...
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner
da0c4d8004
clean up comments
...
llvm-svn: 19920
2005-01-29 17:29:05 +00:00
Chris Lattner
624546465c
This has been deprecated for long enough, nuke it.
...
llvm-svn: 19919
2005-01-29 17:27:26 +00:00
Reid Spencer
298f85282c
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
b79950be4d
Add LLVMbzip2 library, now required.
...
llvm-svn: 18255
2004-11-25 20:22:06 +00:00
Reid Spencer
bbdeb2181d
Fix usage of changed function prototype
...
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Reid Spencer
d3f7233495
Change Library Names Not To Conflict With Others When Installed
...
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer
5574857063
We're not doing automake any more
...
llvm-svn: 17168
2004-10-22 21:02:23 +00:00
Reid Spencer
e48ba34fd4
We won't use automake
...
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer
ce514b1c2c
Initial automake generated Makefile template
...
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Reid Spencer
e6418ec30f
Update to reflect changes in Makefile rules.
...
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer
817a069ea4
Initial version of automake Makefile.am file.
...
llvm-svn: 16894
2004-10-10 22:36:40 +00:00
Reid Spencer
c4abcbefb1
Changes For Bug 352
...
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/.
llvm-svn: 16137
2004-09-01 22:55:40 +00:00
Reid Spencer
e044a2172e
Add the LLVMsystem.a library as it is now used for operating system
...
independence of the tool.
llvm-svn: 16092
2004-08-29 19:29:38 +00:00
Reid Spencer
8cb2484800
The functions in Signal.h are now in the llvm::sys namespace - adjust
...
llvm-svn: 16091
2004-08-29 19:28:55 +00:00
Chris Lattner
79426af62f
Eliminate more traces of the -c option
...
llvm-svn: 14049
2004-06-07 18:10:01 +00:00
Chris Lattner
6f0bab5b9d
Header file moved
...
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner
f8c22e360b
Make sure to print a stack trace whenever an error signal is delivered to the
...
tool.
llvm-svn: 11632
2004-02-19 20:32:12 +00:00
Misha Brukman
b872c6fe8d
Break a line that's over 80cols into two.
...
llvm-svn: 11423
2004-02-13 23:46:47 +00:00
Chris Lattner
e2a5f8c233
Do not advertise our -c option anymore
...
llvm-svn: 11413
2004-02-13 23:24:46 +00:00
Chris Lattner
a2896eaee0
Mercilessly rip the cbackend out of llvm-dis. Leave a helpful error message
...
for those who have not heard the news.
llvm-svn: 11412
2004-02-13 23:22:40 +00:00
Chris Lattner
93da3b1886
Change how we create the cwriter, and add a buttload of libraries that it now
...
needs. This will be fixed shortly
llvm-svn: 11407
2004-02-13 23:01:14 +00:00