| /llvm-project-15.0.7/llvm/unittests/Support/ |
| H A D | AllocatorTest.cpp | 18 BumpPtrAllocator Alloc; in TEST() local 50 BumpPtrAllocator Alloc; in TEST() local 51 Alloc.Allocate(3000, 1); in TEST() 53 Alloc.Allocate(3000, 1); in TEST() 55 Alloc.Allocate(3000, 1); in TEST() 62 BumpPtrAllocator Alloc; in TEST() local 66 Alloc.Reset(); in TEST() 74 Alloc.Reset(); in TEST() 84 BumpPtrAllocator Alloc; in TEST() local 107 BumpPtrAllocator Alloc; in TEST() local [all …]
|
| /llvm-project-15.0.7/llvm/unittests/CodeGen/ |
| H A D | DIEHashTest.cpp | 28 BumpPtrAllocator Alloc; member in __anon12ced4560111::DIEHashTest 57 DIE &Die = *DIE::get(Alloc, dwarf::DW_TAG_base_type); in TEST_F() 167 auto Mem1 = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 177 auto Mem2 = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 199 auto Mem = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 221 auto Mem = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 251 auto Mem = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 286 auto Mem = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 321 auto Mem = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() 639 auto PI = DIE::get(Alloc, dwarf::DW_TAG_member); in TEST_F() [all …]
|
| /llvm-project-15.0.7/clang/test/Analysis/ |
| H A D | malloc-annotations.cpp | 26 void af1(MemoryAllocator &Alloc) { in af1() argument 27 void *p = Alloc.my_malloc(12); in af1() 32 void *p = Alloc.my_malloc(12); in af1_b() 55 void *p = Alloc.my_malloc(12); in af2() 56 Alloc.my_free(p); in af2() 61 void *p = Alloc.my_malloc(12); in af2b() 67 void *p = Alloc.my_malloc(12); in af2c() 74 void *p = Alloc.my_malloc(12); in af2e() 83 Alloc.my_hold(p); in af3() 89 Alloc.my_free(p); in af4() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/memory/specialized.algorithms/specialized.destroy/ |
| H A D | destroy_at.pass.cpp | 45 using Alloc = std::allocator<Array>; in test_arrays() typedef 46 Alloc alloc; in test_arrays() 59 std::allocator_traits<Alloc>::deallocate(alloc, ptr, 1); in test_arrays() 63 using Alloc = std::allocator<Array>; in test_arrays() typedef 64 Alloc alloc; in test_arrays() 78 std::allocator_traits<Alloc>::deallocate(alloc, ptr, 1); in test_arrays() 86 using Alloc = std::allocator<Counted>; in test() typedef 87 Alloc alloc; in test() 103 std::allocator_traits<Alloc>::deallocate(alloc, ptr1, 1); in test() 107 using Alloc = std::allocator<DerivedCounted>; in test() typedef [all …]
|
| H A D | destroy.pass.cpp | 35 using Alloc = std::allocator<Array>; in test_arrays() typedef 37 Alloc alloc; in test_arrays() 38 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays() 52 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays() 56 using Alloc = std::allocator<Array>; in test_arrays() typedef 58 Alloc alloc; in test_arrays() 75 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays() 84 using Alloc = std::allocator<Counted>; in test() typedef 86 Alloc alloc; in test() 90 std::allocator_traits<Alloc>::construct(alloc, p, &counter); in test() [all …]
|
| H A D | destroy_n.pass.cpp | 35 using Alloc = std::allocator<Array>; in test_arrays() typedef 37 Alloc alloc; in test_arrays() 38 Array* pool = std::allocator_traits<Alloc>::allocate(alloc, 5); in test_arrays() 53 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays() 57 using Alloc = std::allocator<Array>; in test_arrays() typedef 59 Alloc alloc; in test_arrays() 77 std::allocator_traits<Alloc>::deallocate(alloc, pool, 5); in test_arrays() 86 using Alloc = std::allocator<Counted>; in test() typedef 88 Alloc alloc; in test() 92 std::allocator_traits<Alloc>::construct(alloc, p, &counter); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/sequences/vector/vector.cons/ |
| H A D | assign_copy.pass.cpp | 38 using Alloc = NonPOCCAAllocator<int>; in tests() typedef 40 std::vector<int, Alloc> l(3, 2, Alloc(5, nullptr)); in tests() 41 std::vector<int, Alloc> l2(l, Alloc(3, ©_assigned_into)); in tests() 46 assert(l2.get_allocator() == Alloc(3, nullptr)); in tests() 51 using Alloc = POCCAAllocator<int>; in tests() typedef 53 std::vector<int, Alloc> l(3, 2, Alloc(5, nullptr)); in tests() 54 std::vector<int, Alloc> l2(l, Alloc(5, ©_assigned_into)); in tests() 59 assert(l2.get_allocator() == Alloc(5, nullptr)); in tests() 64 using Alloc = POCCAAllocator<int>; in tests() typedef 66 std::vector<int, Alloc> l(3, 2, Alloc(5, nullptr)); in tests() [all …]
|
| /llvm-project-15.0.7/libcxx/test/support/ |
| H A D | deduction_guides_sfinae_checks.h | 43 using Alloc = std::allocator<int>; in SequenceContainerDeductionGuidesSfinaeAway() local 71 static_assert(SFINAEs_away<Container, Alloc>); in SequenceContainerDeductionGuidesSfinaeAway() 85 using Alloc = std::allocator<ValueType>; in AssociativeContainerDeductionGuidesSfinaeAway() local 96 using AllocAsComp = Alloc; in AssociativeContainerDeductionGuidesSfinaeAway() 115 SFINAEs_away<Container, OutputIter, OutputIter, Comp, Alloc>); in AssociativeContainerDeductionGuidesSfinaeAway() 124 static_assert(SFINAEs_away<Container, BadIter, BadIter, Alloc>); in AssociativeContainerDeductionGuidesSfinaeAway() 157 using Alloc = std::allocator<ValueType>; in UnorderedContainerDeductionGuidesSfinaeAway() local 169 using AllocAsHash = Alloc; in UnorderedContainerDeductionGuidesSfinaeAway() 170 using AllocAsPred = Alloc; in UnorderedContainerDeductionGuidesSfinaeAway() 214 size_t, Hash, Pred, Alloc>); in UnorderedContainerDeductionGuidesSfinaeAway() [all …]
|
| H A D | uses_alloc_types.h | 135 template <class Alloc> 137 using type = Alloc; 144 template <class Alloc, bool = std::is_default_constructible<Alloc>::value> 146 Alloc allocator; 152 template <class Alloc> 156 Alloc alloc; 164 alloc.~Alloc(); 267 class UsesAllocatorV1 : public UsesAllocatorTestBase<UsesAllocatorV1<Alloc, Arity>, Alloc> 301 class UsesAllocatorV2 : public UsesAllocatorTestBase<UsesAllocatorV2<Alloc, Arity>, Alloc> 327 class UsesAllocatorV3 : public UsesAllocatorTestBase<UsesAllocatorV3<Alloc, Arity>, Alloc> [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/memory/allocator.traits/allocator.traits.members/ |
| H A D | destroy.pass.cpp | 85 typedef NoDestroy<CountDestructor> Alloc; in test() typedef 87 Alloc alloc; in test() 93 std::allocator_traits<Alloc>::destroy(alloc, pool); in test() 96 std::allocator_traits<Alloc>::deallocate(alloc, pool, 1); in test() 100 typedef NoDestroy<T> Alloc; in test() typedef 101 Alloc alloc; in test() 104 std::allocator_traits<Alloc>::destroy(alloc, pool); in test() 105 std::allocator_traits<Alloc>::deallocate(alloc, pool, 1); in test() 108 typedef CountDestroy<CountDestructor> Alloc; in test() typedef 111 Alloc alloc(&destroys_called); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/libcxx/containers/sequences/vector/vector.cons/ |
| H A D | construct_iter_iter_alloc.pass.cpp | 25 typedef C::allocator_type Alloc; in test_ctor_under_alloc() typedef 26 Alloc a; in test_ctor_under_alloc() 28 Alloc::construct_called = false; in test_ctor_under_alloc() 30 assert(Alloc::construct_called); in test_ctor_under_alloc() 33 Alloc::construct_called = false; in test_ctor_under_alloc() 35 assert(Alloc::construct_called); in test_ctor_under_alloc() 40 typedef C::allocator_type Alloc; in test_ctor_under_alloc() typedef 41 Alloc a; in test_ctor_under_alloc() 43 Alloc::construct_called = false; in test_ctor_under_alloc() 45 assert(Alloc::construct_called); in test_ctor_under_alloc() [all …]
|
| H A D | construct_iter_iter.pass.cpp | 24 typedef C::allocator_type Alloc; in test_ctor_under_alloc() typedef 26 Alloc::construct_called = false; in test_ctor_under_alloc() 28 assert(Alloc::construct_called); in test_ctor_under_alloc() 31 Alloc::construct_called = false; in test_ctor_under_alloc() 33 assert(Alloc::construct_called); in test_ctor_under_alloc() 38 typedef C::allocator_type Alloc; in test_ctor_under_alloc() typedef 40 Alloc::construct_called = false; in test_ctor_under_alloc() 42 assert(Alloc::construct_called); in test_ctor_under_alloc() 45 Alloc::construct_called = false; in test_ctor_under_alloc() 47 assert(Alloc::construct_called); in test_ctor_under_alloc()
|
| /llvm-project-15.0.7/llvm/include/llvm/Support/ |
| H A D | AllocatorBase.h | 104 template <typename Alloc> class AllocatorHolder : Alloc { 107 AllocatorHolder(const Alloc &A) : Alloc(A) {} in AllocatorHolder() 108 AllocatorHolder(Alloc &&A) : Alloc(static_cast<Alloc &&>(A)) {} in AllocatorHolder() 109 Alloc &getAllocator() { return *this; } in getAllocator() 110 const Alloc &getAllocator() const { return *this; } in getAllocator() 113 template <typename Alloc> class AllocatorHolder<Alloc &> { 114 Alloc &A; 117 AllocatorHolder(Alloc &A) : A(A) {} in AllocatorHolder() 118 Alloc &getAllocator() { return A; } in getAllocator() 119 const Alloc &getAllocator() const { return A; } in getAllocator()
|
| /llvm-project-15.0.7/libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/ |
| H A D | construct_pair_const_lvalue_pair.pass.cpp | 75 template <class Alloc, class TT, class UU> 84 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_uses_allocator() 85 using U = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 89 using T = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 90 using U = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 94 using T = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 100 template <class Alloc, class TT, class UU> 109 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_not_uses_allocator() 110 using U = UsesAllocatorV2<Alloc, 1>; in test_pmr_not_uses_allocator() 114 using T = UsesAllocatorV2<Alloc, 1>; in test_pmr_not_uses_allocator() [all …]
|
| H A D | construct_pair_rvalue.pass.cpp | 74 template <class Alloc, class TT, class UU> 83 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_uses_allocator() 84 using U = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 88 using T = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 89 using U = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 93 using T = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 99 template <class Alloc, class TT, class UU> 108 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_not_uses_allocator() 109 using U = UsesAllocatorV2<Alloc, 1>; in test_pmr_not_uses_allocator() 113 using T = UsesAllocatorV2<Alloc, 1>; in test_pmr_not_uses_allocator() [all …]
|
| H A D | construct_pair_values.pass.cpp | 73 template <class Alloc, class TT, class UU> 77 using T = NotUsesAllocator<Alloc, 1>; in test_pmr_uses_allocator() 78 using U = NotUsesAllocator<Alloc, 1>; in test_pmr_uses_allocator() 83 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_uses_allocator() 84 using U = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 89 using T = UsesAllocatorV2<Alloc, 1>; in test_pmr_uses_allocator() 90 using U = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 95 using T = UsesAllocatorV3<Alloc, 1>; in test_pmr_uses_allocator() 102 template <class Alloc, class TT, class UU> 112 using T = UsesAllocatorV1<Alloc, 1>; in test_pmr_not_uses_allocator() [all …]
|
| /llvm-project-15.0.7/llvm/unittests/ADT/ |
| H A D | CoalescingBitVectorTest.cpp | 41 UBitVec BV1(Alloc); in TEST() 42 UBitVec BV2(Alloc); in TEST() 54 UBitVec BV(Alloc); in TEST() 64 UBitVec BV(Alloc); in TEST() 74 UBitVec BV1(Alloc); in TEST() 87 UBitVec BV(Alloc); in TEST() 136 UBitVec BV(Alloc); in TEST() 161 UBitVec BV1(Alloc); in TEST() 162 UBitVec BV2(Alloc); in TEST() 206 UBitVec BV1(Alloc); in TEST() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/utilities/memory/default.allocator/ |
| H A D | allocator_types.pass.cpp | 44 typedef std::allocator<T> Alloc; in test() typedef 45 static_assert((std::is_same<typename Alloc::size_type, std::size_t>::value), ""); in test() 46 static_assert((std::is_same<typename Alloc::difference_type, std::ptrdiff_t>::value), ""); in test() 47 static_assert((std::is_same<typename Alloc::value_type, T>::value), ""); in test() 48 …static_assert((std::is_same<typename Alloc::propagate_on_container_move_assignment, std::true_type… in test() 49 static_assert((std::is_same<typename Alloc::is_always_equal, std::true_type>::value), ""); in test() 52 static_assert((std::is_same<typename Alloc::pointer, T*>::value), ""); in test() 53 static_assert((std::is_same<typename Alloc::const_pointer, T const*>::value), ""); in test() 54 static_assert((std::is_same<typename Alloc::reference, T&>::value), ""); in test() 55 static_assert((std::is_same<typename Alloc::const_reference, T const&>::value), ""); in test() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.multiset/ |
| H A D | swap_member.pass.cpp | 32 typedef test_allocator<int> Alloc; in main() typedef 60 typedef test_allocator<int> Alloc; in main() typedef 108 typedef test_allocator<int> Alloc; in main() typedef 150 typedef test_allocator<int> Alloc; in main() typedef 212 typedef other_allocator<int> Alloc; in main() typedef 240 typedef other_allocator<int> Alloc; in main() typedef 288 typedef other_allocator<int> Alloc; in main() typedef 392 typedef min_allocator<int> Alloc; in main() typedef 420 typedef min_allocator<int> Alloc; in main() typedef 468 typedef min_allocator<int> Alloc; in main() typedef [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.set/unord.set.swap/ |
| H A D | swap_non_member.pass.cpp | 32 typedef test_allocator<int> Alloc; in main() typedef 60 typedef test_allocator<int> Alloc; in main() typedef 110 typedef test_allocator<int> Alloc; in main() typedef 154 typedef test_allocator<int> Alloc; in main() typedef 220 typedef other_allocator<int> Alloc; in main() typedef 248 typedef other_allocator<int> Alloc; in main() typedef 296 typedef other_allocator<int> Alloc; in main() typedef 400 typedef min_allocator<int> Alloc; in main() typedef 428 typedef min_allocator<int> Alloc; in main() typedef 476 typedef min_allocator<int> Alloc; in main() typedef [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.set/ |
| H A D | swap_member.pass.cpp | 32 typedef test_allocator<int> Alloc; in main() typedef 60 typedef test_allocator<int> Alloc; in main() typedef 108 typedef test_allocator<int> Alloc; in main() typedef 150 typedef test_allocator<int> Alloc; in main() typedef 212 typedef other_allocator<int> Alloc; in main() typedef 240 typedef other_allocator<int> Alloc; in main() typedef 288 typedef other_allocator<int> Alloc; in main() typedef 392 typedef min_allocator<int> Alloc; in main() typedef 420 typedef min_allocator<int> Alloc; in main() typedef 468 typedef min_allocator<int> Alloc; in main() typedef [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.multiset/unord.multiset.swap/ |
| H A D | swap_non_member.pass.cpp | 32 typedef test_allocator<int> Alloc; in main() typedef 60 typedef test_allocator<int> Alloc; in main() typedef 110 typedef test_allocator<int> Alloc; in main() typedef 154 typedef test_allocator<int> Alloc; in main() typedef 220 typedef other_allocator<int> Alloc; in main() typedef 248 typedef other_allocator<int> Alloc; in main() typedef 296 typedef other_allocator<int> Alloc; in main() typedef 400 typedef min_allocator<int> Alloc; in main() typedef 428 typedef min_allocator<int> Alloc; in main() typedef 476 typedef min_allocator<int> Alloc; in main() typedef [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.map/unord.map.swap/ |
| H A D | swap_non_member.pass.cpp | 35 C c1(0, Hash(1), Compare(1), Alloc(1, 1)); in main() 36 C c2(0, Hash(2), Compare(2), Alloc(1, 2)); in main() 223 C c1(0, Hash(1), Compare(1), Alloc(1)); in main() 224 C c2(0, Hash(2), Compare(2), Alloc(2)); in main() 232 assert(c1.get_allocator() == Alloc(2)); in main() 241 assert(c2.get_allocator() == Alloc(1)); in main() 403 C c1(0, Hash(1), Compare(1), Alloc()); in main() 404 C c2(0, Hash(2), Compare(2), Alloc()); in main() 412 assert(c1.get_allocator() == Alloc()); in main() 421 assert(c2.get_allocator() == Alloc()); in main() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/unord/unord.map/ |
| H A D | swap_member.pass.cpp | 36 C c1(0, Hash(1), Compare(1), Alloc(1, 1)); in main() 37 C c2(0, Hash(2), Compare(2), Alloc(1, 2)); in main() 216 C c1(0, Hash(1), Compare(1), Alloc(1)); in main() 217 C c2(0, Hash(2), Compare(2), Alloc(2)); in main() 225 assert(c1.get_allocator() == Alloc(2)); in main() 234 assert(c2.get_allocator() == Alloc(1)); in main() 396 C c1(0, Hash(1), Compare(1), Alloc()); in main() 397 C c2(0, Hash(2), Compare(2), Alloc()); in main() 405 assert(c1.get_allocator() == Alloc()); in main() 414 assert(c2.get_allocator() == Alloc()); in main() [all …]
|
| /llvm-project-15.0.7/libcxx/test/std/containers/associative/ |
| H A D | iterator_types.pass.cpp | 61 typedef test_allocator<ValueTp> Alloc; in main() typedef 62 typedef std::map<int, int, std::less<int>, Alloc> Map; in main() 68 typedef min_allocator<ValueTp> Alloc; in main() typedef 69 typedef std::map<int, int, std::less<int>, Alloc> Map; in main() 80 typedef test_allocator<ValueTp> Alloc; in main() typedef 87 typedef min_allocator<ValueTp> Alloc; in main() typedef 99 typedef test_allocator<ValueTp> Alloc; in main() typedef 100 typedef std::set<ValueTp, std::less<ValueTp>, Alloc> Set; in main() 106 typedef min_allocator<ValueTp> Alloc; in main() typedef 118 typedef test_allocator<ValueTp> Alloc; in main() typedef [all …]
|