1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
Commit Graph

13 Commits

Author SHA1 Message Date
Chris Lattner
f536c93134 convert LoopInfo.h and GraphWriter.h to use raw_ostream
llvm-svn: 79836
2009-08-23 07:19:13 +00:00
Argyrios Kyrtzidis
e8ee71bbd8 Revert r78424.
In order for the changes in r78424 to work properly, cast_retty<X,Y> should return an object instead of a reference, and it's not clear that this approach has real advantages.

llvm-svn: 79023
2009-08-14 19:01:37 +00:00
Argyrios Kyrtzidis
36a6dfff07 Modifications to dyn_cast/cast to make them work for objects too, instead of only pointers.
The use case is if you have a wrapper class:

class Base {
  void *Ptr;
public:
  Base() : Ptr(0) { }
  operator bool() const { return Ptr; }
.....
}

and sub-wrappers that have exactly the same size:

class Sub : public Base {
public:
....
static bool classof(const Base*);
}

and in the code you would do:

void f(Base b) {
  Sub sub = dyn_cast<Sub>(b);
  if (sub) {
    ....
  }
}

llvm-svn: 78424
2009-08-07 22:49:24 +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
Dan Gohman
dd9c91e583 Remove uses of "llvm/Support/Debug.h" from LLVM include files, which
all happened be unnecessary.

llvm-svn: 53182
2008-07-07 18:14:29 +00:00
Gabor Greif
32b4942a0a merge of r49785 (from branches/ggreif/use-diet): pass V to dyn_cast by const reference, this avoids copy-constructing and destructing all the time. especially important if these constructors are not accessible
llvm-svn: 49787
2008-04-16 11:43:47 +00:00
Chris Lattner
e0b1ee937a Don't attribute in file headers anymore. See llvmdev for the
discussion of this change.  Boy are my fingers tired. ;-)

llvm-svn: 45411
2007-12-29 19:59:42 +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
48bd5207a4 Used llvm_ostream instead of std::ostream objects. This will reduce use
of the icky <iostream> class.

llvm-svn: 31818
2006-11-17 09:52:49 +00:00
Reid Spencer
0be60af352 Add a #include <cassert> for situations where Casting.h is used standalone.
Patch contributed by Vladimir Prus.

llvm-svn: 28280
2006-05-13 17:50:38 +00:00
Misha Brukman
8018cc9e05 Remove trailing whitespace
llvm-svn: 21411
2005-04-21 20:48:15 +00:00
Reid Spencer
c4abcbefb1 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