summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-as/llvm-as.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Change raw_fd_ostream to take flags as an optional bitmask Chris Lattner2009-08-231-75/+51
| | | | | | | | | | | | | | | | instead of as two bools. Use this to add a F_Append flag which has the obvious behavior. Other unrelated changes conflated into this patch: 1. REmove EH stuff from llvm-dis and llvm-as, the try blocks are dead. 2. Simplify the filename inference code in llvm-as/llvm-dis, because raw_fd_ostream does the right thing with '-'. 3. Switch machine verifier to use raw_ostream instead of ostream (Which is the thing that needed append in the first place). llvm-svn: 79807
* Convert more tools code from cerr and cout to errs() and outs().Dan Gohman2009-07-161-7/+6
| | | | llvm-svn: 76070
* To simplify the upcoming context-on-type change, switch all command line ↵Owen Anderson2009-07-151-1/+1
| | | | | | | | 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
* Add a Force option to raw_fd_ostream to specify whether openingDan Gohman2009-07-151-27/+21
| | | | | | | | 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
* switch the .ll parser into SMDiagnostic.Chris Lattner2009-07-021-2/+3
| | | | llvm-svn: 74734
* Hold the LLVMContext by reference rather than by pointer.Owen Anderson2009-07-011-1/+1
| | | | llvm-svn: 74640
* Add a pointer to the owning LLVMContext to Module. This requires threading ↵Owen Anderson2009-07-011-1/+3
| | | | | | | | | | 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
* Change various llvm utilities to use PrettyStackTraceProgram inChris Lattner2009-03-061-2/+5
| | | | | | | their main routines. This makes the tools print their argc/argv commands if they crash. llvm-svn: 66248
* Reimplement the old and horrible bison parser for .ll files with a niceChris Lattner2009-01-021-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and clean recursive descent parser. This change has a couple of ramifications: 1. The parser code is about 400 lines shorter (in what we maintain, not including what is autogenerated). 2. The code should be significantly faster than the old code because we don't have to work around bison's poor handling of datatypes with ctors/dtors. This also makes the code much more resistant to memory leaks. 3. We now get caret diagnostics from the .ll parser, woo. 4. The actual diagnostics emited from the parser are completely different so a bunch of testcases had to be updated. 5. I now disallow "%ty = type opaque %ty = type i32". There was no good reason to support this, it was just an accident of the old implementation. I have no reason to think that anyone is actually using this. 6. The syntax for sticking a global variable has changed to make it unambiguous. I don't think anyone is depending on this since only clang supports this and it is not solid yet, so I'm not worried about anything breaking. 7. This gets rid of the last use of bison, and along with it the .cvs files. I'll prune this from the makefiles as a subsequent commit. There are a few minor cleanups that can be done after this commit (suggestions welcome!) but this passes dejagnu testing and is ready for its time in the limelight. llvm-svn: 61558
* Add -disable-output option.Devang Patel2008-02-211-2/+6
| | | | llvm-svn: 47422
* remove attributions from tools.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45421
* Move the space in overview output for commands out of each of theDan Gohman2007-10-081-1/+1
| | | | | | commands and into the common code. llvm-svn: 42752
* 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 tools to bitcode instead of bytecodeChris Lattner2007-05-061-19/+4
| | | | llvm-svn: 36868
* add a temporary -bitcode option, which instructs llvm-as to produce a ↵Chris Lattner2007-04-221-2/+11
| | | | | | bitcode file instead of a bytecode file llvm-svn: 36333
* default to emiting an uncompressed .bc fileChris Lattner2007-01-211-1/+1
| | | | llvm-svn: 33420
* Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, areBill Wendling2006-12-071-15/+15
| | | | | | now cerr, cout, and NullStream resp. llvm-svn: 32298
* make all llvm tools call llvm_shutdown when they exit, static'ify some stuff.Chris Lattner2006-12-061-0/+2
| | | | | | With this change, I can now move -stats to print when llvm_shutdown is called. llvm-svn: 32250
* Replacing std::iostreams with llvm iostreams. Some of these changes involveBill Wendling2006-11-291-11/+12
| | | | | | | adding a temporary wrapper around the ostream to make it friendly to functions expecting an LLVM stream. This should be fixed in the future. llvm-svn: 31990
* For PR797:Reid Spencer2006-08-181-5/+3
| | | | | | | | | | | | | Rid the Assembly Parser of exceptions. This is a really gross hack but it will do until the Assembly Parser is re-written as a recursive descent. The basic premise is that wherever the old "ThrowException" function was called (new name: GenerateError) we set a flag (TriggerError). Every production checks that flag and calls YYERROR if it is set. Additionally, each call to ThrowException in the grammar is replaced with GEN_ERROR which calls GenerateError and then YYERROR immediately. This prevents the remaining production from continuing after an error condition. llvm-svn: 29763
* Change the verifier to never throw an exception. Instead verifyModule ↵Chris Lattner2006-07-061-8/+8
| | | | | | canoptionally return the string error, which is an easier api for clients touse anyway. llvm-svn: 29017
* Silly cleanupChris Lattner2006-05-291-1/+1
| | | | llvm-svn: 28544
* Remove trailing whitespaceMisha Brukman2005-04-221-10/+10
| | | | llvm-svn: 21428
* Print the module, not the pointer.Chris Lattner2005-02-131-1/+1
| | | | llvm-svn: 20156
* Use binary mode for reading/writing bytecode filesJeff Cohen2005-01-221-15/+16
| | | | llvm-svn: 19751
* Prevent output of bytecode to std::cout unless the --force flag is given.Reid Spencer2005-01-021-1/+4
| | | | | | This prevents bytecode splats with usage like: cat file.ll | llvm-as - llvm-svn: 19239
* Fix typo 'ompress' => 'compress'.Jeff Cohen2005-01-011-1/+1
| | | | llvm-svn: 19232
* For PR351:Reid Spencer2004-12-301-2/+9
| | | | | | | | | | * 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
* Fix usage of changed function prototypeReid Spencer2004-11-141-3/+4
| | | | llvm-svn: 17798
* Rename the option for defeating compression to be a little more specific.Reid Spencer2004-11-071-1/+1
| | | | llvm-svn: 17567
* Turn on compression by default.Reid Spencer2004-11-071-3/+3
| | | | | | Change --compress to --no-compress so compression can be turned off. llvm-svn: 17564
* Add support for compressed bytecodeReid Spencer2004-11-061-1/+4
| | | | llvm-svn: 17535
* Changes For Bug 352Reid Spencer2004-09-011-1/+1
| | | | | | | | 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
* The functions in Signal.h are now in the llvm::sys namespace - adjustReid Spencer2004-08-291-2/+2
| | | | llvm-svn: 16091
* Actually, use an exception to stop verification. This gives us much betterChris Lattner2004-07-131-1/+5
| | | | | | error messages because verification stops at the first error. llvm-svn: 14794
* There is no reason to abort and print a stack trace if there is a verificationChris Lattner2004-07-131-1/+1
| | | | | | error. Just print the message like a good little tool. llvm-svn: 14793
* Correct an output typo.Reid Spencer2004-07-111-1/+1
| | | | llvm-svn: 14766
* Add #include <iostream> since Value.h does not include it any more.Reid Spencer2004-07-041-0/+1
| | | | llvm-svn: 14623
* Write .bc files to binary ostreams. This shouldn't change anything on unix,Chris Lattner2004-06-251-2/+4
| | | | | | | but allows us to generate valid code on hosts (like windows) that do newline translation for text files. llvm-svn: 14418
* Header file movedChris Lattner2004-05-271-1/+1
| | | | llvm-svn: 13813
* Make sure to print a stack trace whenever an error signal is delivered to theChris Lattner2004-02-191-0/+1
| | | | | | tool. llvm-svn: 11632
* Put all LLVM code into the llvm namespace, as per bug 109.Brian Gaeke2003-11-111-0/+2
| | | | llvm-svn: 9903
* Fix file headerChris Lattner2003-10-201-3/+1
| | | | llvm-svn: 9292
* Added copyright header to all C++ source files.John Criswell2003-10-201-0/+8
| | | | llvm-svn: 9291
* Fix grammar.Misha Brukman2003-10-101-1/+1
| | | | llvm-svn: 9026
* Renaming LLVM `as' to `llvm-as'.Misha Brukman2003-08-281-4/+4
| | | | llvm-svn: 8188
* Add new -disable-verify optionChris Lattner2003-08-181-2/+5
| | | | llvm-svn: 7960
* Add support for: -o -Chris Lattner2003-05-311-7/+11
| | | | llvm-svn: 6485
* Kill using declarationsChris Lattner2003-05-221-15/+14
| | | | llvm-svn: 6292
* - 'analyze' and 'as' now explicitly verify input because AsmParser doesn't.Chris Lattner2002-08-301-0/+7
| | | | llvm-svn: 3552
OpenPOWER on IntegriCloud