mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
Removed PointerUnion3 and PointerUnion4 aliases in favor of the variadic template
This commit is contained in:
parent
b10e6ebb2b
commit
fa88faafeb
@ -272,16 +272,6 @@ struct PointerLikeTypeTraits<PointerUnion<PTs...>> {
|
|||||||
PointerUnion<PTs...>::Val)>::NumLowBitsAvailable;
|
PointerUnion<PTs...>::Val)>::NumLowBitsAvailable;
|
||||||
};
|
};
|
||||||
|
|
||||||
/// A pointer union of three pointer types. See documentation for PointerUnion
|
|
||||||
/// for usage.
|
|
||||||
template <typename PT1, typename PT2, typename PT3>
|
|
||||||
using PointerUnion3 = PointerUnion<PT1, PT2, PT3>;
|
|
||||||
|
|
||||||
/// A pointer union of four pointer types. See documentation for PointerUnion
|
|
||||||
/// for usage.
|
|
||||||
template <typename PT1, typename PT2, typename PT3, typename PT4>
|
|
||||||
using PointerUnion4 = PointerUnion<PT1, PT2, PT3, PT4>;
|
|
||||||
|
|
||||||
// Teach DenseMap how to use PointerUnions as keys.
|
// Teach DenseMap how to use PointerUnions as keys.
|
||||||
template <typename ...PTs> struct DenseMapInfo<PointerUnion<PTs...>> {
|
template <typename ...PTs> struct DenseMapInfo<PointerUnion<PTs...>> {
|
||||||
using Union = PointerUnion<PTs...>;
|
using Union = PointerUnion<PTs...>;
|
||||||
|
@ -61,10 +61,10 @@ private:
|
|||||||
/// into relatively small files (often smaller than 2^8 or 2^16 bytes),
|
/// into relatively small files (often smaller than 2^8 or 2^16 bytes),
|
||||||
/// we select the offset vector element type dynamically based on the
|
/// we select the offset vector element type dynamically based on the
|
||||||
/// size of Buffer.
|
/// size of Buffer.
|
||||||
using VariableSizeOffsets = PointerUnion4<std::vector<uint8_t> *,
|
using VariableSizeOffsets = PointerUnion<std::vector<uint8_t> *,
|
||||||
std::vector<uint16_t> *,
|
std::vector<uint16_t> *,
|
||||||
std::vector<uint32_t> *,
|
std::vector<uint32_t> *,
|
||||||
std::vector<uint64_t> *>;
|
std::vector<uint64_t> *>;
|
||||||
|
|
||||||
/// Vector of offsets into Buffer at which there are line-endings
|
/// Vector of offsets into Buffer at which there are line-endings
|
||||||
/// (lazily populated). Once populated, the '\n' that marks the end of
|
/// (lazily populated). Once populated, the '\n' that marks the end of
|
||||||
|
@ -1811,7 +1811,7 @@ bool LowerTypeTestsModule::lower() {
|
|||||||
// reference them. This is used to partition the set of type identifiers in
|
// reference them. This is used to partition the set of type identifiers in
|
||||||
// the module into disjoint sets.
|
// the module into disjoint sets.
|
||||||
using GlobalClassesTy = EquivalenceClasses<
|
using GlobalClassesTy = EquivalenceClasses<
|
||||||
PointerUnion3<GlobalTypeMember *, Metadata *, ICallBranchFunnel *>>;
|
PointerUnion<GlobalTypeMember *, Metadata *, ICallBranchFunnel *>>;
|
||||||
GlobalClassesTy GlobalClasses;
|
GlobalClassesTy GlobalClasses;
|
||||||
|
|
||||||
// Verify the type metadata and build a few data structures to let us
|
// Verify the type metadata and build a few data structures to let us
|
||||||
|
@ -43,7 +43,7 @@ class InputFile {
|
|||||||
std::unique_ptr<NativeSession> PdbSession;
|
std::unique_ptr<NativeSession> PdbSession;
|
||||||
object::OwningBinary<object::Binary> CoffObject;
|
object::OwningBinary<object::Binary> CoffObject;
|
||||||
std::unique_ptr<MemoryBuffer> UnknownFile;
|
std::unique_ptr<MemoryBuffer> UnknownFile;
|
||||||
PointerUnion3<PDBFile *, object::COFFObjectFile *, MemoryBuffer *> PdbOrObj;
|
PointerUnion<PDBFile *, object::COFFObjectFile *, MemoryBuffer *> PdbOrObj;
|
||||||
|
|
||||||
using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
|
using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ using namespace llvm;
|
|||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
typedef PointerUnion<int *, float *> PU;
|
typedef PointerUnion<int *, float *> PU;
|
||||||
typedef PointerUnion3<int *, float *, long long *> PU3;
|
typedef PointerUnion<int *, float *, long long *> PU3;
|
||||||
typedef PointerUnion4<int *, float *, long long *, double *> PU4;
|
typedef PointerUnion<int *, float *, long long *, double *> PU4;
|
||||||
|
|
||||||
struct PointerUnionTest : public testing::Test {
|
struct PointerUnionTest : public testing::Test {
|
||||||
float f;
|
float f;
|
||||||
|
Loading…
Reference in New Issue
Block a user