mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +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;
|
||||
};
|
||||
|
||||
/// 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.
|
||||
template <typename ...PTs> struct DenseMapInfo<PointerUnion<PTs...>> {
|
||||
using Union = PointerUnion<PTs...>;
|
||||
|
@ -61,7 +61,7 @@ private:
|
||||
/// into relatively small files (often smaller than 2^8 or 2^16 bytes),
|
||||
/// we select the offset vector element type dynamically based on the
|
||||
/// size of Buffer.
|
||||
using VariableSizeOffsets = PointerUnion4<std::vector<uint8_t> *,
|
||||
using VariableSizeOffsets = PointerUnion<std::vector<uint8_t> *,
|
||||
std::vector<uint16_t> *,
|
||||
std::vector<uint32_t> *,
|
||||
std::vector<uint64_t> *>;
|
||||
|
@ -1811,7 +1811,7 @@ bool LowerTypeTestsModule::lower() {
|
||||
// reference them. This is used to partition the set of type identifiers in
|
||||
// the module into disjoint sets.
|
||||
using GlobalClassesTy = EquivalenceClasses<
|
||||
PointerUnion3<GlobalTypeMember *, Metadata *, ICallBranchFunnel *>>;
|
||||
PointerUnion<GlobalTypeMember *, Metadata *, ICallBranchFunnel *>>;
|
||||
GlobalClassesTy GlobalClasses;
|
||||
|
||||
// Verify the type metadata and build a few data structures to let us
|
||||
|
@ -43,7 +43,7 @@ class InputFile {
|
||||
std::unique_ptr<NativeSession> PdbSession;
|
||||
object::OwningBinary<object::Binary> CoffObject;
|
||||
std::unique_ptr<MemoryBuffer> UnknownFile;
|
||||
PointerUnion3<PDBFile *, object::COFFObjectFile *, MemoryBuffer *> PdbOrObj;
|
||||
PointerUnion<PDBFile *, object::COFFObjectFile *, MemoryBuffer *> PdbOrObj;
|
||||
|
||||
using TypeCollectionPtr = std::unique_ptr<codeview::LazyRandomTypeCollection>;
|
||||
|
||||
|
@ -13,8 +13,8 @@ using namespace llvm;
|
||||
namespace {
|
||||
|
||||
typedef PointerUnion<int *, float *> PU;
|
||||
typedef PointerUnion3<int *, float *, long long *> PU3;
|
||||
typedef PointerUnion4<int *, float *, long long *, double *> PU4;
|
||||
typedef PointerUnion<int *, float *, long long *> PU3;
|
||||
typedef PointerUnion<int *, float *, long long *, double *> PU4;
|
||||
|
||||
struct PointerUnionTest : public testing::Test {
|
||||
float f;
|
||||
|
Loading…
Reference in New Issue
Block a user