Home
last modified time | relevance | path

Searched refs:exchange (Results 1 – 25 of 70) sorted by relevance

123

/llvm-project-15.0.7/libcxx/test/std/utilities/utility/exchange/
H A Dexchange.pass.cpp29 if (12 != std::exchange(v,23) || v != 23) in test_constexpr()
35 if (67 != std::exchange<int, short>(v, {}) || v != 0) in test_constexpr()
53 ASSERT_NOEXCEPT(std::exchange(x, 42)); in test_noexcept()
57 ASSERT_NOEXCEPT(std::exchange(x, std::move(x))); in test_noexcept()
62 ASSERT_NOT_NOEXCEPT(std::exchange(x, std::move(x))); in test_noexcept()
76 assert ( std::exchange ( v, 23 ) == 12 ); in main()
88 assert ( !std::exchange ( b, true )); in main()
96 assert ( std::exchange ( s3, s2 ) == s1 ); in main()
98 assert ( std::exchange ( s3, "Hi Mom!" ) == s2 ); in main()
102 assert ( std::exchange ( s3, {} ) == s2 ); in main()
[all …]
/llvm-project-15.0.7/libcxx/test/std/atomics/atomics.types.generic/
H A Dbool.pass.cpp72 assert(obj.exchange(false) == true); in main()
74 assert(obj.exchange(true, std::memory_order_relaxed) == false); in main()
123 assert(obj.exchange(false) == true); in main()
125 assert(obj.exchange(true, std::memory_order_relaxed) == false); in main()
174 assert(obj.exchange(false) == true); in main()
176 assert(obj.exchange(true, std::memory_order_relaxed) == false); in main()
H A Daddress.pass.cpp91 assert(obj.exchange(T(2)) == T(1)); in do_test()
93 assert(obj.exchange(T(3), std::memory_order_relaxed) == T(2)); in do_test()
H A Dintegral.pass.cpp108 assert(obj.exchange(T(2)) == T(1)); in do_test()
110 assert(obj.exchange(T(3), std::memory_order_relaxed) == T(2)); in do_test()
/llvm-project-15.0.7/llvm/test/CodeGen/PowerPC/
H A Datomic-1.ll21 define i32 @exchange(i32* %mem, i32 %val) nounwind {
22 ; CHECK-LABEL: exchange:
H A Datomic-2.ll68 define i64 @exchange(i64* %mem, i64 %val) nounwind {
69 ; CHECK-LABEL: exchange:
/llvm-project-15.0.7/llvm/test/CodeGen/SystemZ/
H A Datomicrmw-xchg-01.ll1 ; Test 8-bit atomic exchange.
6 ; Check exchange with a variable.
43 ; Check exchange with a constant. We should force the constant into
H A Datomicrmw-xchg-02.ll1 ; Test 16-bit atomic exchange.
6 ; Check exchange with a variable.
43 ; Check exchange with a constant. We should force the constant into
H A Datomicrmw-xchg-04.ll1 ; Test 64-bit atomic exchange.
5 ; Check register exchange.
76 ; Check exchange of a constant. We should force it into a register and
H A Datomicrmw-xchg-03.ll1 ; Test 32-bit atomic exchange.
5 ; Check register exchange.
109 ; Check exchange of a constant. We should force it into a register and
/llvm-project-15.0.7/llvm/include/llvm/Support/
H A Dthread.h79 : Thread(std::exchange(Other.Thread, native_handle_type())) {} in thread()
98 Thread = std::exchange(Other.Thread, native_handle_type());
173 : Thread(std::exchange(Other.Thread, std::thread())) {}
188 Thread = std::exchange(Other.Thread, std::thread());
H A DManagedStatic.h109 return static_cast<C *>(Ptr.exchange(nullptr));
/llvm-project-15.0.7/llvm/lib/Support/Unix/
H A DSignals.inc111 if (FileToRemoveList *N = Next.exchange(nullptr))
113 if (char *F = Filename.exchange(nullptr))
144 OldFilename = Current->Filename.exchange(nullptr);
159 FileToRemoveList *OldHead = Head.exchange(nullptr);
183 currentFile->Filename.exchange(path);
188 Head.exchange(OldHead);
199 FileToRemoveList *Head = FilesToRemove.exchange(nullptr);
382 OneShotPipeSignalFunction.exchange(nullptr))
420 InterruptFunction.exchange(IF);
425 InfoSignalFunction.exchange(Handler);
[all …]
/llvm-project-15.0.7/clang/include/clang/Analysis/FlowSensitive/
H A DMapLattice.h121 Os << std::exchange(Separator, ", ") << E.first << " => " << E.second;
134 Os << std::exchange(Separator, ", ") << E.first->getName().str() << " => "
/llvm-project-15.0.7/clang-tools-extra/clangd/support/
H A DShutdown.cpp29 if (ShutdownRequested.exchange(true)) in requestShutdown()
/llvm-project-15.0.7/libcxx/include/__utility/
H A Dexchange.h26 _T1 exchange(_T1& __obj, _T2&& __new_value) in exchange() function
/llvm-project-15.0.7/libc/src/threads/linux/
H A Dcall_once.cpp47 auto status = futex_word->exchange(FINISH);
/llvm-project-15.0.7/compiler-rt/test/tsan/
H A Dcustom_mutex.h75 return !locked_.exchange(true); in TryLockImpl()
/llvm-project-15.0.7/libcxxabi/src/
H A Dcxa_guard_impl.h139 …IntType exchange(IntType new_val, MemoryOrder ord) { return std::__libcpp_atomic_exchange(b_, new_… in exchange() function
486 uint8_t old = init_byte.exchange(COMPLETE_BIT, std::_AO_Acq_Rel); in release()
496 uint8_t old = init_byte.exchange(UNSET, std::_AO_Acq_Rel); in abort()
/llvm-project-15.0.7/libcxx/test/std/utilities/optional/optional.object/optional.object.ctor/
H A Doptional_U.pass.cpp53 TEST_CONSTEXPR_CXX20 X(X&& x) : i_(std::exchange(x.i_, 0)) {} in X()
/llvm-project-15.0.7/libc/src/__support/CPP/
H A Datomic.h78 T exchange(T desired, MemoryOrder mem_ord = MemoryOrder::SEQ_CST) {
/llvm-project-15.0.7/clang/include/clang/Basic/
H A Darm_mve.td246 multiclass VQDMLAD<int exchange, int round, int subtract> {
249 (u32 exchange), (u32 round), (u32 subtract))>;
253 (u32 exchange), (u32 round), (u32 subtract), $pred)>;
1374 (unsignedflag Scalar), subtract, exchange,
1379 (unsignedflag Scalar), subtract, exchange,
1385 (unsignedflag Scalar), subtract, exchange,
1391 (unsignedflag Scalar), subtract, exchange,
1411 multiclass MVEBinaryVectorHoriz64Base<dag subtract, dag exchange,
1416 (unsignedflag Scalar), subtract, exchange,
1422 (unsignedflag Scalar), subtract, exchange,
[all …]
/llvm-project-15.0.7/mlir/include/mlir/Analysis/DataFlow/
H A DDeadCodeAnalysis.h115 return std::exchange(allKnown, false) ? ChangeResult::Change in setHasUnknownPredecessors()
/llvm-project-15.0.7/clang-tools-extra/clangd/unittests/support/
H A DThreadingTests.cpp83 EXPECT_THAT(ComputeResult[K].exchange(Result), in TEST_F()
/llvm-project-15.0.7/libcxx/include/__concepts/
H A Dswappable.h89 __y = _VSTD::exchange(__x, _VSTD::move(__y)); in operator()

123