1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
Commit Graph

12 Commits

Author SHA1 Message Date
Douglas Gregor
7bc7d66441 Fix a typo, and all of its copies
llvm-svn: 77489
2009-07-29 18:27:22 +00:00
Douglas Gregor
9072f2cd18 Implement PointerUnion4.
llvm-svn: 77487
2009-07-29 18:19:47 +00:00
Sebastian Redl
51473d2434 Fix three MSVC 2008 warnings that completely clutter the build output.
llvm-svn: 74430
2009-06-29 17:12:06 +00:00
Douglas Gregor
aaa9263fc6 Allow the use of pointers to const within PointerUnion.
llvm-svn: 68159
2009-03-31 23:19:54 +00:00
Douglas Gregor
50b29cfe51 Stop guessing, start thinking, and make PointerUnion3::is actually be correct.
llvm-svn: 68126
2009-03-31 18:31:03 +00:00
Douglas Gregor
41ab75e9ef Really, really fix PointerUnion3::is
llvm-svn: 68079
2009-03-31 00:34:31 +00:00
Douglas Gregor
0beaefea25 Make PointerUnion3::get work properly
llvm-svn: 68067
2009-03-30 21:44:13 +00:00
Chris Lattner
ccc73c9327 update comment.
llvm-svn: 68060
2009-03-30 20:44:04 +00:00
Chris Lattner
a172ae1d4f add a PointerUnion3 class and generalize PointerUnion to work with
anything pointer-like, which may or may not actually be a pointer.

llvm-svn: 68056
2009-03-30 20:29:27 +00:00
Chris Lattner
be9cd842ae add some comments, add a dyn_cast method.
llvm-svn: 67992
2009-03-29 07:03:30 +00:00
Chris Lattner
696742399a add helper method.
llvm-svn: 67989
2009-03-29 06:32:46 +00:00
Chris Lattner
2c6632d760 Add a simple type-safe bit-mangling pointer union class. This allows
you to do things like:

  ///    PointerUnion<int*, float*> P;
  ///    P = (int*)0;
  ///    printf("%d %d", P.is<int*>(), P.is<float*>()); // prints "1 0"
  ///    X = P.get<int*>();     // ok.
  ///    Y = P.get<float*>();   // runtime assertion failure.
  ///    Z = P.get<double*>();  // does not compile.
  ///    P = (float*)0;
  ///    Y = P.get<float*>();   // ok.
  ///    X = P.get<int*>();     // runtime assertion failure.

llvm-svn: 67987
2009-03-29 06:06:02 +00:00