diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-29 06:06:02 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-29 06:06:02 +0000 |
commit | 2491e4657d95f7ff61fb2a741ba9996e492df515 (patch) | |
tree | c48a2fd0a701d382b5b5ac273a81aa1fa4e861f5 /lib/CodeGen/SelectionDAG/LegalizeTypes.cpp | |
parent | 540db8bcb8d7dae55456d8564c1d54071ec6ed50 (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67987 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeTypes.cpp')
0 files changed, 0 insertions, 0 deletions