Home
last modified time | relevance | path

Searched refs:CountCopyAndMove (Results 1 – 10 of 10) sorted by relevance

/llvm-project/llvm/unittests/ADT/
H A DSTLForwardCompatTest.cpp61 using llvm::CountCopyAndMove; in TEST()
63 std::optional<CountCopyAndMove> A; in TEST()
65 CountCopyAndMove::ResetCounts(); in TEST()
67 std::move(A), [&](const CountCopyAndMove &M) { return M.val + 2; }); in TEST()
69 EXPECT_EQ(0, CountCopyAndMove::TotalCopies()); in TEST()
70 EXPECT_EQ(0, CountCopyAndMove::MoveConstructions); in TEST()
71 EXPECT_EQ(0, CountCopyAndMove::MoveAssignments); in TEST()
72 EXPECT_EQ(0, CountCopyAndMove::Destructions); in TEST()
74 A = CountCopyAndMove(5); in TEST()
75 CountCopyAndMove::ResetCounts(); in TEST()
[all …]
H A DDenseSetTest.cpp152 struct CountCopyAndMove { struct
156 CountCopyAndMove(int Value) : Value(Value) {} in CountCopyAndMove() function
158 CountCopyAndMove(const CountCopyAndMove &RHS) { in CountCopyAndMove() argument
162 CountCopyAndMove &operator=(const CountCopyAndMove &RHS) { in operator =() argument
167 CountCopyAndMove(CountCopyAndMove &&RHS) { in CountCopyAndMove() argument
171 CountCopyAndMove &operator=(const CountCopyAndMove &&RHS) { in operator =() argument
177 int CountCopyAndMove::Copy = 0;
178 int CountCopyAndMove::Move = 0;
183 template <> struct DenseMapInfo<CountCopyAndMove> {
184 static inline CountCopyAndMove getEmptyKey() { return CountCopyAndMove(-1); }; in getEmptyKey()
[all …]
H A DCountCopyAndMove.h1 //===- llvm/unittest/ADT/CountCopyAndMove.h - Optional unit tests ---------===//
14 struct CountCopyAndMove { struct
24 CountCopyAndMove() { ++DefaultConstructions; } in CountCopyAndMove() argument
25 explicit CountCopyAndMove(int val) : val(val) { ++ValueConstructions; } in CountCopyAndMove()
26 CountCopyAndMove(const CountCopyAndMove &other) : val(other.val) { in CountCopyAndMove()
29 CountCopyAndMove &operator=(const CountCopyAndMove &other) {
34 CountCopyAndMove(CountCopyAndMove in CountCopyAndMove()
22 valCountCopyAndMove global() argument
23 CountCopyAndMoveCountCopyAndMove CountCopyAndMove() argument
32 CountCopyAndMoveCountCopyAndMove CountCopyAndMove() argument
40 ~CountCopyAndMoveCountCopyAndMove ~CountCopyAndMove() argument
42 ResetCountsCountCopyAndMove ResetCounts() argument
50 TotalCopiesCountCopyAndMove TotalCopies() argument
52 TotalMovesCountCopyAndMove TotalMoves() argument
[all...]
H A DDenseMapTest.cpp390 DenseMap<int, CountCopyAndMove> Map; in TEST()
394 CountCopyAndMove::ResetCounts(); in TEST()
397 Map.insert(std::pair<int, CountCopyAndMove>(std::piecewise_construct, in TEST()
403 EXPECT_EQ(ExpectedMaxInitialEntries, CountCopyAndMove::TotalMoves()); in TEST()
405 EXPECT_EQ(0, CountCopyAndMove::TotalCopies()); in TEST()
408 Map.insert(std::pair<int, CountCopyAndMove>( in TEST()
418 EXPECT_EQ(0, CountCopyAndMove::TotalCopies()); in TEST()
430 DenseMap<int, CountCopyAndMove> Map(Size); in TEST()
432 CountCopyAndMove::ResetCounts(); in TEST()
435 Map.insert(std::pair<int, CountCopyAndMove>(std::piecewise_construct, in TEST()
[all …]
H A DCountCopyAndMove.cpp1 //===- llvm/unittest/ADT/CountCopyAndMove.cpp - Optional unit tests -------===//
9 #include "CountCopyAndMove.h"
13 int CountCopyAndMove::DefaultConstructions = 0;
14 int CountCopyAndMove::ValueConstructions = 0;
15 int CountCopyAndMove::CopyConstructions = 0;
16 int CountCopyAndMove::CopyAssignments = 0;
17 int CountCopyAndMove::MoveConstructions = 0;
18 int CountCopyAndMove::MoveAssignments = 0;
19 int CountCopyAndMove::Destructions = 0;
H A DStringMapTest.cpp85 struct CountCopyAndMove { struct
86 CountCopyAndMove() = default;
87 CountCopyAndMove(const CountCopyAndMove &) { copy = 1; } in CountCopyAndMove() argument
88 CountCopyAndMove(CountCopyAndMove &&) { move = 1; } in CountCopyAndMove() argument
89 void operator=(const CountCopyAndMove &) { ++copy; } in operator =() argument
90 void operator=(CountCopyAndMove &&) { ++move; } in operator =() argument
306 struct A : CountCopyAndMove { in TEST_F()
91 copy__anond51e927c0111::CountCopyAndMove global() argument
92 move__anond51e927c0111::CountCopyAndMove global() argument
H A DMapVectorTest.cpp18 struct CountCopyAndMove { struct
19 CountCopyAndMove() = default;
20 CountCopyAndMove(const CountCopyAndMove &) { copy = 1; } in CountCopyAndMove() function
21 CountCopyAndMove(CountCopyAndMove &&) { move = 1; } in CountCopyAndMove() argument
22 void operator=(const CountCopyAndMove &) { ++copy; } in operator =() argument
23 void operator=(CountCopyAndMove &&) { ++move; } in operator =() argument
28 struct A : CountCopyAndMove {
H A DCMakeLists.txt21 CountCopyAndMove.cpp
/llvm-project/compiler-rt/lib/sanitizer_common/tests/
H A Dsanitizer_dense_map_test.cpp327 struct CountCopyAndMove { struct
330 CountCopyAndMove() {} in CountCopyAndMove() function
332 CountCopyAndMove(const CountCopyAndMove &) { Copy++; } in CountCopyAndMove() function
333 CountCopyAndMove &operator=(const CountCopyAndMove &) { in operator =() argument
337 CountCopyAndMove(CountCopyAndMove &&) { Move++; } in CountCopyAndMove() argument
338 CountCopyAndMove &operator=(const CountCopyAndMove &&) { in operator =() argument
343 int CountCopyAndMove::Copy = 0;
344 int CountCopyAndMove::Move = 0;
375 DenseMap<int, CountCopyAndMove> Map; in TEST()
379 CountCopyAndMove::Copy = 0; in TEST()
[all …]
/llvm-project/llvm/utils/gn/secondary/llvm/unittests/ADT/
H A DBUILD.gn29 "CountCopyAndMove.cpp",