Commit Graph

87 Commits

Author SHA1 Message Date
Bill Wendling
e81561909d Changed llvm_ostream et all to OStream. llvm_cerr, llvm_cout, llvm_null, are
now cerr, cout, and NullStream resp.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32298 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-07 01:30:32 +00:00
Chris Lattner
82c4bc7153 Remove the dead CachedWriter class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32271 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:40:49 +00:00
Chris Lattner
3749c9cae4 Remove the 'printname' argument to WriteAsOperand. It is always true, and
passing false would make the asmprinter fail anyway.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32264 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 06:16:21 +00:00
Chris Lattner
cb5736bde6 remove unused api
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32261 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-06 05:55:44 +00:00
Reid Spencer
c1126ac7cd Remove dead code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32157 91177308-0d34-0410-b5e6-96231b3b80d8
2006-12-03 16:21:33 +00:00
Bill Wendling
d96662360f Support for llvm_ostreams.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31988 91177308-0d34-0410-b5e6-96231b3b80d8
2006-11-28 23:31:42 +00:00
Reid Spencer
6118eefe99 Back out last revision which should not have been committed (yet).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29935 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 01:08:45 +00:00
Reid Spencer
3a9ec2463d For PR387:
Close out this long standing bug by removing the remaining overloaded
virtual functions in LLVM. The -Woverloaded-virtual option is now turned on.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29934 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-28 01:02:49 +00:00
Reid Spencer
61c83e023f For PR797:
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.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@29763 91177308-0d34-0410-b5e6-96231b3b80d8
2006-08-18 08:43:06 +00:00
Reid Spencer
3ccc7b4654 Replace an old C-style cast with a C++ cast (squelch warning)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28533 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-29 02:32:43 +00:00
Reid Spencer
c773de6d61 Fix some doxygen usage in these headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28394 91177308-0d34-0410-b5e6-96231b3b80d8
2006-05-19 19:07:54 +00:00
Jim Laskey
0a868961d6 Unused function - easier to throw away than fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27123 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-25 18:42:45 +00:00
Chris Lattner
03dd465215 Split memcpy/memset/memmove intrinsics into i32/i64 versions, resolving
PR709, and paving the way for future progress.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26476 91177308-0d34-0410-b5e6-96231b3b80d8
2006-03-03 00:00:25 +00:00
Reid Spencer
e2a5fb0e08 Fix auto-upgrade of intrinsics to work properly with both assembly and
bytecode reading. This code is crufty, the result of much hacking to get things
working correctly. Cleanup patches will follow.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25682 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-27 11:49:27 +00:00
Reid Spencer
0fc0ab7148 1. Documentation upgrade.
2. Have UpgradeInstrinicCall return an Instruction* instead of a CallInst*
   and return the needed CastInst* if the result of the upgraded call needs
   to be casted back to a signed type.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25446 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 06:59:26 +00:00
Reid Spencer
4283ac7857 Add a new interface function to AutoUpgrade for simultaneously upgrading
the Function and the CallInst: UpgradeCallsToIntrinsic(Function*). Also,
re-factor the AutoUpgrade implementation to eliminate some duplication of
code.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25432 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-19 01:18:29 +00:00
Reid Spencer
e86bf519e1 For PR411:
This file makes the helper functions for auto-upgrade of llvm assembly and
bytecode more accessible. This is part of de-overloading of intrinsic
functions to support the flat symbol table (no type planes).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25365 91177308-0d34-0410-b5e6-96231b3b80d8
2006-01-16 21:06:01 +00:00
Chris Lattner
98c162a086 Give the asmparser the ability to parse strings, patch contributed by
Alexander Friedman!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22145 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-20 03:25:29 +00:00
Reid Spencer
edd5d9ece1 Some cleanups for compilation with GCC 4.0.0 to remove warnings:
* Use C++ style casts, not C style casts
* Abstract base classes should have virtual destructor.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22057 91177308-0d34-0410-b5e6-96231b3b80d8
2005-05-15 16:13:11 +00:00
Misha Brukman
3b1b6e626e Convert tabs to spaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21436 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-22 03:27:20 +00:00
Misha Brukman
9769ab2226 Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21408 91177308-0d34-0410-b5e6-96231b3b80d8
2005-04-21 20:19:05 +00:00
Jeff Cohen
184d84b07d Add llvm-as project to Visual Studio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@19227 91177308-0d34-0410-b5e6-96231b3b80d8
2005-01-01 20:51:41 +00:00
Chris Lattner
b12914bfc0 'Pass' should now not be derived from by clients. Instead, they should derive
from ModulePass.  Instead of implementing Pass::run, then should implement
ModulePass::runOnModule.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16436 91177308-0d34-0410-b5e6-96231b3b80d8
2004-09-20 04:48:05 +00:00
Chris Lattner
0a8e8e1a4e Fixes for PR341
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14847 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-15 02:51:31 +00:00
Reid Spencer
ed3d16e443 Add a new, compatible, interface function for writing types as operands.
This is necessary because Types are no longer Values.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14598 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:59:05 +00:00
Reid Spencer
2d59de545a Added #include <iostream> since this header is no longer picked up from
the Value.h header.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14597 91177308-0d34-0410-b5e6-96231b3b80d8
2004-07-04 10:58:20 +00:00
Misha Brukman
acc9076e86 Revert ostream back to reference: the only user (llvm-tv) no longer needs it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14029 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 21:10:35 +00:00
Chris Lattner
fb04197c01 Remove support for printing strings from the cached writer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14023 91177308-0d34-0410-b5e6-96231b3b80d8
2004-06-04 20:34:51 +00:00
Reid Spencer
798ff64328 Part of bug 122:
This change removes the BuildBytecodeInfo flag from the SlotCalculator
class. This flag was needed to distinguish between the Bytecode/Writer
and the AsmWriter. Now that AsmWriter doesn't use SlotCalculator, we can
remove this flag and simplify some code. Also, some minor name changes
to CachedWriter.h needed to be committed (missed in previous commit).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13785 91177308-0d34-0410-b5e6-96231b3b80d8
2004-05-26 07:37:11 +00:00
Misha Brukman
df3d2e95a2 * Make contained ostream not public.
* Remove various print methods that called the Value* method, just have one that
  all subclasses of Value will use anyway.
* Remove template for printing constant references
* Add methods to print char* and strings
* setStream now sets the stream on the contained AssemblyWriter


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13246 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 19:22:58 +00:00
Misha Brukman
3f98def801 * Add ability to get and set the output stream
* New feature: outputting a Type* as symbolic, controlled via the stream
  similarly to sending std::hex to change number format


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13226 91177308-0d34-0410-b5e6-96231b3b80d8
2004-04-28 15:30:33 +00:00
Chris Lattner
0b6af79e62 Add the ability to put an annotation at the end of a basic block as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12230 91177308-0d34-0410-b5e6-96231b3b80d8
2004-03-08 18:51:05 +00:00
Chris Lattner
8e3eb5542b The cbackend has never had anything to do with llvm assembly writing
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11411 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:19:51 +00:00
Chris Lattner
208d638fa4 Change access to the cwriter
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11406 91177308-0d34-0410-b5e6-96231b3b80d8
2004-02-13 23:00:45 +00:00
Chris Lattner
a25b3557a1 Remove yet another obsolete comment :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10720 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:28:45 +00:00
Brian Gaeke
33310b4e07 Fix typos. Rewrite head-of-file comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10719 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:21:59 +00:00
Brian Gaeke
d2b40b7f69 Fix typos. Regularize include guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10718 91177308-0d34-0410-b5e6-96231b3b80d8
2004-01-08 22:21:58 +00:00
Brian Gaeke
d0fde30ce8 Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
2003-11-11 22:41:34 +00:00
Chris Lattner
0836bf7bcf New interface
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9618 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-30 23:39:52 +00:00
John Criswell
6fbcc26f14 Added LLVM copyright header (for lack of a better term).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9304 91177308-0d34-0410-b5e6-96231b3b80d8
2003-10-20 20:19:47 +00:00
Chris Lattner
48486893f4 Standardize header file comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8782 91177308-0d34-0410-b5e6-96231b3b80d8
2003-09-30 18:37:50 +00:00
Chris Lattner
fd479b6fd4 Workaround for bug in GCC 3.1.1 iostreams library on sparc. It apprarently
isn't flushing an ostream when it is deleted.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3834 91177308-0d34-0410-b5e6-96231b3b80d8
2002-09-19 20:49:25 +00:00
Chris Lattner
8ac883939b Convert cwriter to be a pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3557 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-31 00:28:25 +00:00
Chris Lattner
917914885d Update comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3547 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-30 22:51:21 +00:00
Chris Lattner
9bb451e721 Module's do not subclass from Value, so this code caused a segfault.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3376 91177308-0d34-0410-b5e6-96231b3b80d8
2002-08-18 00:37:14 +00:00
Chris Lattner
8bf58bbc69 Regularize the Print*Passes so they have default ctors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3006 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-23 17:58:09 +00:00
Chris Lattner
46f824f21d Allow specifying a module for context instead of a slot calculator directly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2851 91177308-0d34-0410-b5e6-96231b3b80d8
2002-07-10 16:48:14 +00:00
Chris Lattner
7e70829632 MEGAPATCH checkin.
For details, See: docs/2002-06-25-MegaPatchInfo.txt


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2779 91177308-0d34-0410-b5e6-96231b3b80d8
2002-06-25 16:13:24 +00:00
Sumant Kowshik
9ddc86c6e5 *** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2552 91177308-0d34-0410-b5e6-96231b3b80d8
2002-05-08 18:09:58 +00:00
Chris Lattner
96c466b06a Add new optional getPassName() virtual function that a Pass can override
to make debugging output a lot nicer.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2395 91177308-0d34-0410-b5e6-96231b3b80d8
2002-04-29 14:57:45 +00:00