1 //===- llvm/unittest/ADT/MoveOnly.h - Optional unit tests -----------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef LLVM_UNITTESTS_ADT_MOVEONLY_H
10 #define LLVM_UNITTESTS_ADT_MOVEONLY_H
15 static unsigned MoveConstructions
;
16 static unsigned Destructions
;
17 static unsigned MoveAssignments
;
19 explicit MoveOnly(int val
) : val(val
) {
21 MoveOnly(MoveOnly
&& other
) {
25 MoveOnly
&operator=(MoveOnly
&& other
) {
33 static void ResetCounts() {
34 MoveConstructions
= 0;
40 } // end namespace llvm
42 #endif // LLVM_UNITTESTS_ADT_MOVEONLY_H