Misha Brukman
2d4b2dd2d3
* Alphabetized system headers per the style guide
...
* Minor spacing and comment cleanups
llvm-svn: 61590
2009-01-02 20:26:30 +00:00
Chris Lattner
6eb2690ea4
newline at end of phile
...
llvm-svn: 60744
2008-12-09 06:32:32 +00:00
Chris Lattner
14f67ea7b5
pred_iterator got a lot slower since use-diet landed. This is a
...
really simple cache class for these queries. Hopefully this can
be removed if pred_iterator speeds back up.
llvm-svn: 60742
2008-12-09 06:27:07 +00:00
Ted Kremenek
a851e459e1
Have raw_fd_ostream keep track of the position in the file to make tell() go faster by not requiring a flush().
...
llvm-svn: 60560
2008-12-04 22:51:11 +00:00
Ted Kremenek
b31e49cd47
Add 'tell' method to raw_fd_ostream that clients can use to query the current location in the file the stream is writing to.
...
llvm-svn: 60085
2008-11-26 03:33:13 +00:00
Nuno Lopes
821f6d257e
change AnnotationManager to use 'const char*' instead of std::string. this fixes the leakage of those strings and avoids the creation of such strings in static cosntructors (should result in a little improvement of startup time)
...
llvm-svn: 60064
2008-11-26 00:00:44 +00:00
Scott Michel
d8a57b624e
Roll back rev 59890, since Chris says this can never happen.
...
llvm-svn: 59914
2008-11-23 19:22:48 +00:00
Scott Michel
0da772db1c
Check for NULL before traversing the isa<> type hierarchy checking with a
...
NULL-based reference.
Note: Encountered this a few times on Tiger + gcc 4.0.1. Might just be a
platform-specific compiler issue, but it's good defensive programming in any
case.
llvm-svn: 59890
2008-11-22 23:49:26 +00:00
Chris Lattner
e111ce1265
add a write method.
...
llvm-svn: 59595
2008-11-19 06:45:06 +00:00
Chris Lattner
047dc0a77a
add a new m_Specific pattern that matches only if we have a specific Value*.
...
llvm-svn: 59393
2008-11-16 04:38:30 +00:00
Chris Lattner
f612178d64
add a new template for matching a select between two constants.
...
llvm-svn: 59391
2008-11-16 04:33:10 +00:00
Nick Lewycky
3889c7ebf0
Clean up some strange whitespace.
...
llvm-svn: 59373
2008-11-15 20:32:33 +00:00
Daniel Dunbar
a830cb14f3
Add Binary flag to raw_fd_ostream constructor.
...
Document raw_fd_ostream's treatment of "-".
llvm-svn: 59219
2008-11-13 05:01:07 +00:00
Anton Korobeynikov
d47d0bc96c
Symbol visibility is unsupported on cygwin too.
...
Patch by Jay Foad!
llvm-svn: 58520
2008-10-31 18:05:01 +00:00
Dan Gohman
50061675c5
Canonicalize sext(i1) to i1?-1:0, and update various instcombine
...
optimizations accordingly.
llvm-svn: 58457
2008-10-30 20:40:10 +00:00
Bill Wendling
b8d234c2e3
Revert r58411. The user needs to #define this when using the JITMemoryManager.h header.
...
llvm-svn: 58414
2008-10-30 01:22:58 +00:00
Bill Wendling
9ebb27a645
Revert part of r58048. It was breaking on SnowLeopard claiming that
...
"__STDC_CONSTANT_MACROS" needs to be #defined first.
llvm-svn: 58411
2008-10-30 00:11:55 +00:00
Dan Gohman
8edffdd299
Fix the name of the include guard to match the filename.
...
llvm-svn: 58310
2008-10-28 00:52:46 +00:00
Oscar Fuentes
5021ba82e0
CMake: Sync'ed DataTypes.h.cmake with DataTypes.h.in.
...
llvm-svn: 58131
2008-10-25 03:25:11 +00:00
Ted Kremenek
b04b85f615
Added raw_fd_ostream::close().
...
llvm-svn: 58052
2008-10-23 23:49:09 +00:00
Steve Naroff
ea17111230
Changes to make the Windows build work...
...
- Add a file to the VC++ project.
- Make sure the clang driver links against the Transforms library.
- Incorporate changes from patch by Dan Gohman.
llvm-svn: 58048
2008-10-23 23:28:23 +00:00
Argyrios Kyrtzidis
6ffea1355c
Introduce INT64_C macro and unbreak LLVM on MSVC.
...
llvm-svn: 58039
2008-10-23 17:20:39 +00:00
Daniel Dunbar
aa7a7ae8d5
Clear raw_fd_ostream error string on success and explain behavior in
...
documentation.
Add C++ header marker.
llvm-svn: 57923
2008-10-21 19:53:10 +00:00
Daniel Dunbar
553c69eecd
Rename IRBuilder::IsNonNull -> IsNotNull in response to feedback.
...
llvm-svn: 56953
2008-10-02 17:05:03 +00:00
Daniel Dunbar
fe82c1180a
Add IRBuilder::{CreateIsNull, CreateIsNonNull} helper methods.
...
- I'm open to the idea that these could have better names. I think
these read better than CreateEQNull and CreateNENull.
llvm-svn: 56757
2008-09-27 23:22:55 +00:00
Devang Patel
64dd7a2e89
Large mechanical patch.
...
s/ParamAttr/Attribute/g
s/PAList/AttrList/g
s/FnAttributeWithIndex/AttributeWithIndex/g
s/FnAttr/Attribute/g
This sets the stage
- to implement function notes as function attributes and
- to distinguish between function attributes and return value attributes.
This requires corresponding changes in llvm-gcc and clang.
llvm-svn: 56622
2008-09-25 21:00:45 +00:00
Devang Patel
a3e9bf1bca
s/ParameterAttributes/Attributes/g
...
llvm-svn: 56513
2008-09-23 23:03:40 +00:00
Oscar Fuentes
0f25988689
Initial support for the CMake build system.
...
llvm-svn: 56419
2008-09-22 01:08:49 +00:00
Nuno Lopes
8d481ade2f
plug memleak: destroy internal buffer
...
llvm-svn: 55632
2008-09-02 12:06:08 +00:00
Evan Cheng
20b295388f
Add DebugInfoBuilder. Patch by Talin!
...
llvm-svn: 55409
2008-08-27 06:51:14 +00:00
Ted Kremenek
5f192023b2
Grammar fix.
...
llvm-svn: 55371
2008-08-26 16:41:15 +00:00
Ted Kremenek
909c1c36e2
Added "str()" method to raw_string_ostream.
...
str() mirrors the same method in std::ostringstream.
str() flushes the buffered stream contents to string and returns a reference to the string.
llvm-svn: 55370
2008-08-26 16:34:01 +00:00
Chris Lattner
3ad9fe55e5
Add raw_stream adaptors that write into an std::string and SmallVector/SmallString.
...
llvm-svn: 55265
2008-08-23 22:43:04 +00:00
Chris Lattner
fe3155fc62
Switch the asmprinter (.ll) and all the stuff it requires over to
...
use raw_ostream instead of std::ostream. Among other goodness,
this speeds up llvm-dis of kc++ with a release build from 0.85s
to 0.49s (88% faster).
Other interesting changes:
1) This makes Value::print be non-virtual.
2) AP[S]Int and ConstantRange can no longer print to ostream directly,
use raw_ostream instead.
3) This fixes a bug in raw_os_ostream where it didn't flush itself
when destroyed.
4) This adds a new SDNode::print method, instead of only allowing "dump".
A lot of APIs have both std::ostream and raw_ostream versions, it would
be useful to go through and systematically anihilate the std::ostream
versions.
This passes dejagnu, but there may be minor fallout, plz let me know if
so and I'll fix it.
llvm-svn: 55263
2008-08-23 22:23:09 +00:00
Chris Lattner
719fad27a8
Split format() out to its own file, add support for formatting
...
up to three values in one call.
llvm-svn: 55251
2008-08-23 19:48:00 +00:00
Chris Lattner
9ef2c187a0
conditionalize this to work on windows, untested but it should work
...
according to the intarnetz
llvm-svn: 55248
2008-08-23 19:27:03 +00:00
Chris Lattner
b7914ec04e
add a simple mechanism for formatted output. This gives raw_ostream's
...
all the power and risk of fprintf format strings. Use them like this:
OS << format("%10.4f", 42.0) << "\n" << format("%x", 42) << '\n';
llvm-svn: 55246
2008-08-23 19:23:10 +00:00
Nicolas Geoffray
00aced70f5
Also overload for char, since the "char" type depends on the host.
...
llvm-svn: 55173
2008-08-22 08:44:47 +00:00
Owen Anderson
e17306778c
Overload for both signed and unsigned char.
...
llvm-svn: 55171
2008-08-22 07:42:25 +00:00
Owen Anderson
5a542e7eda
Move non-trivial methods out of line to avoid code-size bloat.
...
llvm-svn: 55138
2008-08-21 20:58:52 +00:00
Owen Anderson
902453c302
Implement operator<< in terms of basic types rather than [u]int*_t, which is better for portability. There might be some way to factor this all with metaprogramming magic, but I'm not sure how offhand.
...
llvm-svn: 55114
2008-08-21 06:20:47 +00:00
Eli Friedman
fdab2ca258
Remove size_t operator; this unbreaks the build on Linux. Committing on
...
the suggestion of resistor.
If this breaks some other platform, please go ahead and back this out.
llvm-svn: 55106
2008-08-21 04:28:31 +00:00
Owen Anderson
2c1d54952b
Use raw_ostream throughout the AsmPrinter.
...
llvm-svn: 55092
2008-08-21 00:14:44 +00:00
Chris Lattner
f155e446fd
add raw_ostream method for emitting an unsigned.
...
llvm-svn: 54972
2008-08-19 04:23:02 +00:00
Gordon Henriksen
0a5e079b8e
Don't require Registry specializations to define random static variables.
...
llvm-svn: 54902
2008-08-17 19:08:34 +00:00
Cedric Venet
e1e9213f95
Make it compile on VC2005:
...
- update VC projects.
- Add an overload to llvm::Stream for <<, since std::hex and std::dec have type std::ios_base& (*)(std::ios_base&) in VC++. (templating the function don't work, due to ambiguities)
- add ../ on several include in X86/AsmPrinter/
llvm-svn: 54898
2008-08-17 18:24:26 +00:00
Nick Lewycky
7d6a6f4509
Fix build on GCC 4.3.
...
llvm-svn: 54870
2008-08-17 06:40:16 +00:00
Chris Lattner
dab4a64423
add support for a cout/cerr analog (outs()/errs()) as well as
...
a simple adaptor class to give raw output capabilities to
something that wants to write to an ostream.
llvm-svn: 54865
2008-08-17 04:13:37 +00:00
Chris Lattner
eef022091c
rename OutputData to 'write' to match ostream.
...
llvm-svn: 54857
2008-08-17 01:46:05 +00:00
Chris Lattner
fd2dd46dcd
remove accidental comment.
...
llvm-svn: 54856
2008-08-17 01:35:54 +00:00