Commit Graph

83 Commits

Author SHA1 Message Date
Gabor Greif e16561cd5d 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 9e9a34c6bf use the new MemoryBuffer interfaces to simplify error reporting in clients.
llvm-svn: 36900
2007-05-06 23:45:49 +00:00
Chris Lattner 6d80e21a1d switch tools to bitcode instead of bytecode
llvm-svn: 36868
2007-05-06 09:29:57 +00:00
Chris Lattner f693167d68 simplify code
llvm-svn: 36837
2007-05-06 04:43:36 +00:00
Chris Lattner 6694f60bec 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 8ca41bfb57 don't break reading from stdin
llvm-svn: 36336
2007-04-22 06:35:20 +00:00
Chris Lattner e224446728 teach llvm-dis to read bitcode files
llvm-svn: 36334
2007-04-22 06:31:02 +00:00
Chris Lattner a0e49f2ead 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 216835d688 add an option for timing bc file reading.
llvm-svn: 33977
2007-02-07 04:39:35 +00:00
Bill Wendling f3baad3ee1 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 76d4632d92 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 a531ac291c Convert to using llvm streams instead of iostreams.
llvm-svn: 31989
2006-11-28 23:33:06 +00:00
Chris Lattner 956f73bdfa Switch to using llvm-config to build
llvm-svn: 30088
2006-09-04 05:24:16 +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
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
Misha Brukman 650ba8eb56 Remove trailing whitespace
llvm-svn: 21428
2005-04-22 00:00:37 +00:00
Chris Lattner 0174b52dd9 clean up comments
llvm-svn: 19920
2005-01-29 17:29:05 +00:00
Chris Lattner e89f022ba7 This has been deprecated for long enough, nuke it.
llvm-svn: 19919
2005-01-29 17:27:26 +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 d3f2e95e6c Add LLVMbzip2 library, now required.
llvm-svn: 18255
2004-11-25 20:22:06 +00:00
Reid Spencer b2d0fa0823 Fix usage of changed function prototype
llvm-svn: 17798
2004-11-14 22:30:54 +00:00
Reid Spencer 57cbe39d1e Change Library Names Not To Conflict With Others When Installed
llvm-svn: 17286
2004-10-27 23:18:45 +00:00
Reid Spencer 5fd95ce095 We're not doing automake any more
llvm-svn: 17168
2004-10-22 21:02:23 +00:00
Reid Spencer c1c320c335 We won't use automake
llvm-svn: 17155
2004-10-22 03:35:04 +00:00
Reid Spencer 6a11a75f31 Initial automake generated Makefile template
llvm-svn: 17136
2004-10-18 23:55:41 +00:00
Reid Spencer ace94df71f Update to reflect changes in Makefile rules.
llvm-svn: 16950
2004-10-13 11:46:52 +00:00
Reid Spencer f6d9ceebc6 Initial version of automake Makefile.am file.
llvm-svn: 16894
2004-10-10 22:36:40 +00:00
Reid Spencer 7c16caa336 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 74c3dc6927 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 e3263ecaf0 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 bbc373bf8b Eliminate more traces of the -c option
llvm-svn: 14049
2004-06-07 18:10:01 +00:00
Chris Lattner 278f5152d3 Header file moved
llvm-svn: 13813
2004-05-27 05:41:36 +00:00
Chris Lattner 12439ffbac 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 7c437d3226 Break a line that's over 80cols into two.
llvm-svn: 11423
2004-02-13 23:46:47 +00:00
Chris Lattner c5a4641c21 Do not advertise our -c option anymore
llvm-svn: 11413
2004-02-13 23:24:46 +00:00
Chris Lattner 92849b7dc9 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 9fae109121 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
Chris Lattner 7cb5070672 Restore the -llvm option
llvm-svn: 9915
2003-11-12 04:59:59 +00:00
Brian Gaeke 960707c335 Put all LLVM code into the llvm namespace, as per bug 109.
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
John Criswell abe5cdcf21 Added LLVM copyright to Makefiles.
llvm-svn: 9314
2003-10-20 22:29:16 +00:00
Chris Lattner 8f71f04961 fix file header
llvm-svn: 9294
2003-10-20 17:58:43 +00:00
John Criswell 09344dcf97 Added copyright header to all C++ source files.
llvm-svn: 9291
2003-10-20 17:47:21 +00:00
Misha Brukman d67697411a Fix grammar.
llvm-svn: 9026
2003-10-10 17:56:49 +00:00
Misha Brukman 3a0677e0da Renamed dis.cpp => llvm-dis.cpp
llvm-svn: 9017
2003-10-10 17:30:10 +00:00
Misha Brukman f12549d921 Renaming LLVM `dis' to `llvm-dis'.
llvm-svn: 8189
2003-08-28 21:34:13 +00:00
Misha Brukman 3f0385d424 Chomped spurious blank lines.
llvm-svn: 7700
2003-08-08 15:37:35 +00:00
Chris Lattner 306f8b4934 Add support for: -o -
llvm-svn: 6485
2003-05-31 21:47:16 +00:00
Chris Lattner 02a168310b Kill using declarations
llvm-svn: 6292
2003-05-22 20:13:16 +00:00
Chris Lattner f46a02c88e Give verbose error messages if bytecode file cannot be parsed
llvm-svn: 5789
2003-04-16 20:51:36 +00:00
Chris Lattner 47c2e3e952 Make sure to close the file before deleting it
llvm-svn: 3905
2002-09-24 00:09:48 +00:00