Bill Wendling
7f6a73eb5c
Added an automatic cast to "std::ostream*" etc. from OStream. We then can
...
rework the hacks that had us passing OStream in. We pass in std::ostream*
instead, check for null, and then dispatch to the correct print() method.
llvm-svn: 32636
2006-12-17 05:15:13 +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
Bill Wendling
4157840bd6
Added a temporary hack to get the llvm-streams to work for future checkins.
...
llvm-svn: 31978
2006-11-28 22:21:29 +00:00
Owen Anderson
12374f766b
Add support for the new "target data" information in .ll files. This provides
...
a better encoding of the targets data layout, rather than trying to guess it
from the endianness and pointersize like before.
llvm-svn: 31030
2006-10-18 02:21:12 +00:00
Reid Spencer
2d7af150ca
Make the getNamedFunction and getNamedGlobal methods be const. They don't
...
change the module in any way and we should enforce that.
llvm-svn: 28588
2006-05-31 16:40:28 +00:00
Owen Anderson
89fd16ffc8
Change Module to use TargetData-compatible strings internally.
...
This is part of the on-going work on PR 761.
llvm-svn: 28379
2006-05-18 02:10:31 +00:00
Reid Spencer
f613de1e0b
For PR778:
...
Improve doxygenification of this header file.
llvm-svn: 28317
2006-05-16 06:27:31 +00:00
Chris Lattner
ad498794f8
add a new helper method
...
llvm-svn: 26617
2006-03-08 18:38:51 +00:00
Chris Lattner
d36993d81d
Change inline asms to be uniqued like constants, not embedded in a Module.
...
llvm-svn: 25610
2006-01-25 18:57:27 +00:00
Chris Lattner
50ba79e71b
Initial checkin of the InlineAsm class
...
llvm-svn: 25570
2006-01-24 04:13:11 +00:00
Chris Lattner
7812ed6d6a
Add global scope asm support
...
llvm-svn: 25555
2006-01-23 23:02:28 +00:00
Chris Lattner
31d0e66ff2
Fix out of date comments, patch by Marco Matthies.
...
llvm-svn: 25143
2006-01-08 02:32:52 +00:00
Chris Lattner
8e01c48256
Add a flag to Module::getGlobalVariable to allow it to return vars with
...
internal linkage.
Patch provided by Evan Jones, thanks!
llvm-svn: 24604
2005-12-05 05:30:21 +00:00
Chris Lattner
71195650ea
Add a missing Module::setTargetTriple method.
...
Remove Function::aiterator and Module::giterator typedefs (and const versions)
as they should have been removed when abegin/gbegin were removed. Thanks to
alkis for bringing this to my attn.
llvm-svn: 23978
2005-10-25 17:58:00 +00:00
Jeff Cohen
a38c737e85
When a function takes a variable number of pointer arguments, with a zero
...
pointer marking the end of the list, the zero *must* be cast to the pointer
type. An un-cast zero is a 32-bit int, and at least on x86_64, gcc will
not extend the zero to 64 bits, thus allowing the upper 32 bits to be
random junk.
The new END_WITH_NULL macro may be used to annotate a such a function
so that GCC (version 4 or newer) will detect the use of un-casted zero
at compile time.
llvm-svn: 23888
2005-10-23 04:37:20 +00:00
Chris Lattner
774a5d8b9a
remove deprecated methods
...
llvm-svn: 22076
2005-05-16 01:49:23 +00:00
Misha Brukman
3f0aa3dbf8
Remove trailing whitespace
...
llvm-svn: 21408
2005-04-21 20:19:05 +00:00
Chris Lattner
a2fd75ccf7
remove a whole bunch of dead methods. Noone should use reverse iterators anyway.
...
llvm-svn: 20600
2005-03-15 05:13:47 +00:00
Chris Lattner
fe56642977
Remove the reverse iterators for arguments and global vars.
...
Rename argument iterators arg_* instead of a*
Remove global variable iterators global_* instead of g*.
Keep the old names for temporary compatibility.
Patch contributed by Gabor Greif!
llvm-svn: 20591
2005-03-14 23:49:40 +00:00
Chris Lattner
4d06277d43
Do not replace ostream << Module*, only ostream << Module&.
...
llvm-svn: 20157
2005-02-13 19:15:01 +00:00
Chris Lattner
382abe80a0
Improve conformance with the Misha spelling benchmark suite
...
llvm-svn: 19930
2005-01-30 00:09:23 +00:00
Chris Lattner
1367f39eb9
Adjust to changes in ilist
...
llvm-svn: 19922
2005-01-29 18:41:00 +00:00
Chris Lattner
da8484d5d3
These methods are long gone, ConstantPointerRef is dead.
...
llvm-svn: 17993
2004-11-19 16:25:42 +00:00
Chris Lattner
60e159a806
Warning fixes for VC++, contributed by Morten Ofstad!
...
llvm-svn: 17831
2004-11-15 19:02:35 +00:00
Misha Brukman
c6897a03b6
Fix grammar (i.e.)
...
llvm-svn: 17343
2004-10-29 19:20:42 +00:00
Reid Spencer
7bd9d86b65
Okay, the list of link-time passes wasn't such a hot idea. Its prone to
...
error. We'll strategize on this when we have multiple front ends to deal
with. For now llvm-ld just runs a standard set of transforms.
llvm-svn: 16333
2004-09-14 05:43:23 +00:00
Reid Spencer
4a1593ebd2
Add support for the link-time pass list to Modules.
...
llvm-svn: 16321
2004-09-13 23:44:23 +00:00
Reid Spencer
9531457813
Make the dependent libraries list use a SetVector instead of a regular
...
vector so that duplicate libraries never occur within a module.
llvm-svn: 16280
2004-09-11 04:22:14 +00:00
Reid Spencer
a3a84e2e08
Provide a method for wholesale extraction of the dependent libraries.
...
llvm-svn: 16038
2004-08-24 22:47:39 +00:00
Reid Spencer
eb9a1c53b7
Reduce the footprint of the dependent library interface
...
Document the dependent library interface
Constify the std::string& parameters in the dep lib interface.
llvm-svn: 15215
2004-07-25 21:28:19 +00:00
Reid Spencer
2e6721531f
bug 263:
...
The necessary changes to module in order to support both target triples and
a list of dependent libraries.
llvm-svn: 15207
2004-07-25 17:52:27 +00:00
Reid Spencer
c197914ffd
bug 122:
...
We don't need to keep track of CPRs any more.
llvm-svn: 14922
2004-07-17 23:30:11 +00:00
Chris Lattner
95ac084df9
Apparently a particular vendor compiler uses the struct/class tag to MANGLE
...
symbols with. Therefore, if you do not use struct/class consistently, you can
get LINK ERRORS. grr.
This fixes the link errors for libsupport and vmcore.
-Chris
llvm-svn: 14070
2004-06-08 17:44:21 +00:00
Chris Lattner
385008f77f
Fix PR266: Make Module Not Inherit From Annotable
...
llvm-svn: 12339
2004-03-12 19:51:16 +00:00
Chris Lattner
164ebd3be3
Remove Module::mutateConstantPointerRef, which is now thankfully dead!
...
llvm-svn: 12215
2004-03-08 06:15:33 +00:00
Chris Lattner
980840a607
Make Module annotable. Reid has a bunch of code that depends on this, and
...
we really don't win that much by eliminating this (not many Modules are
allocated), so it's not worth it. When we can, we should revisit this in
the future.
llvm-svn: 12023
2004-03-01 01:25:37 +00:00
Chris Lattner
f20d4af4e1
Module does not need to be annotatable aka annotable
...
llvm-svn: 12005
2004-02-29 19:27:55 +00:00
Chris Lattner
167644f2e1
Add some comments, add a new getGlobalVariable method
...
llvm-svn: 10670
2003-12-31 08:42:27 +00:00
Chris Lattner
3f6af8506e
* Make Module::getTypeName const
...
* Add new Module::getTypeByName method
* Group methods in Module.cpp better
llvm-svn: 10668
2003-12-31 07:09:33 +00:00
Brian Gaeke
d25f86d683
Put all LLVM code into the llvm namespace, as per bug 109.
...
llvm-svn: 9903
2003-11-11 22:41:34 +00:00
Chris Lattner
8d2a791804
Expose new print methods
...
llvm-svn: 9620
2003-10-30 23:41:19 +00:00
John Criswell
16c6cda9d5
Added LLVM copyright header (for lack of a better term).
...
llvm-svn: 9304
2003-10-20 20:19:47 +00:00
Chris Lattner
4e4c763dfc
Standardize header file comments
...
llvm-svn: 8782
2003-09-30 18:37:50 +00:00
Chris Lattner
84474d02d0
Add new helper function which makes it even easier to do this sort of thing
...
llvm-svn: 8237
2003-08-31 00:19:18 +00:00
Chris Lattner
c6135a9ea7
Allow modules to have 'any' pointer size and endianness.
...
llvm-svn: 8117
2003-08-24 13:46:37 +00:00
Misha Brukman
d36940e9ec
Lined things up in a more aesthetically pleasing way.
...
llvm-svn: 7365
2003-07-28 19:17:53 +00:00
Chris Lattner
b5fc5522fb
Add support for tracking whether a module is 64/32 bit and big/little endian
...
Also add a moduleID field which can be used for diagnostics
llvm-svn: 5834
2003-04-22 18:02:04 +00:00
Chris Lattner
b5027095e5
- Eliminated the deferred symbol table stuff in Module & Function, it really
...
wasn't an optimization and it was causing lots of bugs.
llvm-svn: 4779
2002-11-20 18:36:02 +00:00
Chris Lattner
bd2cbecb05
Add a new Module::getNamedFunction method
...
llvm-svn: 4758
2002-11-19 18:41:44 +00:00
Chris Lattner
2698f71007
Add a method "getMainFunction()" that efficiently locates 'main' in a module
...
llvm-svn: 4629
2002-11-08 20:34:02 +00:00
Chris Lattner
5b41b28fb6
- Dramatically simplify the Constant::mutateReferences implementation,
...
allowing it to be called on all constant types (structures/arrays)
llvm-svn: 4160
2002-10-14 03:30:23 +00:00
Chris Lattner
69f833618d
Convert comments to Doxygen style
...
llvm-svn: 3507
2002-08-25 22:54:55 +00:00
Chris Lattner
8f4f2153e5
- ConstantPointerRefs are now automatically removed from the module table
...
when they are destroyed, which makes Constant::destroyConstant an actually
useful external interface. Expose these methods publicly.
- Implement destroyConstant on ConstPointerNull so that destroyConstant can
be used on any derived type constant safely.
llvm-svn: 3378
2002-08-18 00:39:59 +00:00
Chris Lattner
30c534c3e1
Add Module::dump() method
...
llvm-svn: 3374
2002-08-17 23:32:42 +00:00
Anand Shukla
ffc5389151
Add new << to allow printing modules by reference.
...
llvm-svn: 2814
2002-07-03 16:52:15 +00:00
Chris Lattner
cee706572b
*** empty log message ***
...
llvm-svn: 2777
2002-06-25 16:12:52 +00:00
Chris Lattner
597f27fd29
Include an operator<<, to print modules
...
llvm-svn: 2358
2002-04-28 04:56:28 +00:00
Chris Lattner
24a00025ac
* Module's are no longer Value's
...
* Incorporate SymTabValue contents into the Module class
llvm-svn: 2345
2002-04-28 04:45:48 +00:00
Chris Lattner
92b32c82bf
Add Module::getTypeName
...
llvm-svn: 2237
2002-04-13 18:58:33 +00:00
Chris Lattner
6bdd1d2e3f
* Add virtual print methods
...
* s/Method/Function
llvm-svn: 2172
2002-04-08 21:56:02 +00:00
Chris Lattner
474495e742
Add new addTypeName method to Module class
...
llvm-svn: 2037
2002-03-29 04:48:40 +00:00
Chris Lattner
33ff5dc7e7
Add getOrInsertFunction and getFunction methods to Module. This simplifies
...
some code in the transformations.
llvm-svn: 2026
2002-03-29 03:32:29 +00:00
Chris Lattner
ab9cc61ceb
Remove the reduceApply functions they are obsolete things from the days before
...
we had a reasonable pass system
llvm-svn: 2022
2002-03-28 22:49:49 +00:00
Chris Lattner
a874026838
Transform uses of Method into uses of Function.
...
Rename MethodArgument to FunctionArgument
Fix some _really_ out of date comments
llvm-svn: 1986
2002-03-26 17:48:08 +00:00
Chris Lattner
6298cccfb9
Remove extranous forward decl
...
llvm-svn: 1956
2002-03-23 22:48:21 +00:00
Chris Lattner
3dc9a2a61f
Changes to build successfully with GCC 3.02
...
llvm-svn: 1503
2002-01-20 22:54:45 +00:00
Chris Lattner
f6b7da2bb5
Rename ConstPoolVal -> Constant
...
Rename ConstPool* -> Constant*
Rename ConstPoolVals.h -> ConstantVals.h
llvm-svn: 1407
2001-12-03 22:26:30 +00:00
Chris Lattner
fd1ab08cba
Rename ConstPoolPointerReference to ConstPoolPointerRef - My fingers get tired typing that much
...
llvm-svn: 822
2001-10-15 13:21:42 +00:00
Chris Lattner
6a615c53a2
Add support for module local constants
...
llvm-svn: 737
2001-10-13 06:17:32 +00:00
Chris Lattner
08b1dde37e
Commit more code over to new cast style
...
llvm-svn: 697
2001-10-02 03:41:24 +00:00
Chris Lattner
43781f1f96
Add support for new style casts
...
llvm-svn: 694
2001-10-01 16:18:37 +00:00
Chris Lattner
9d1629d688
Implement global variable support
...
llvm-svn: 530
2001-09-10 07:58:01 +00:00
Chris Lattner
51152baa4a
SymTabValue no longer includes ValueHolder for Module. Include it ourself
...
llvm-svn: 423
2001-09-07 16:20:46 +00:00
Chris Lattner
8131335c27
Made the following changes:
...
* ValueHolder became a 3 argument template. This allows for BasicBlock to
use the value holder arg as a typesafe parent pointer.
* SymTabValue no longer inherits from Value
* Method does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Module does not inherit from only SymTabValue. Now it inherits from both
STV & Value.
* Updated the SymTabValue.h file to reference SymTabValue instead of STDef
in several places
* Added isArraySelector & isStructSelector to GetElementPtr instruction
llvm-svn: 177
2001-07-14 06:07:58 +00:00
Chris Lattner
57248a3460
Add a reduceApply method
...
llvm-svn: 109
2001-06-30 04:34:42 +00:00
Chris Lattner
b2d6da7f1e
Add extra forwarding accessor methods so that getMethodList(), getBasicBlocks()
...
and getInstList() are obsolete... except for when modifying those lists. This
makes code much more succinct and to the point.
llvm-svn: 79
2001-06-27 23:26:41 +00:00
Chris Lattner
e6b9b382e2
Initial revision
...
llvm-svn: 2
2001-06-06 20:29:01 +00:00