Skip to content

Commit a6682af

Browse files
committed
update names
1 parent 832e182 commit a6682af

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

llvm/unittests/ADT/CountCopyAndMove.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010

1111
using namespace llvm;
1212

13-
int CountCopyAndMove::Constructions = 0;
13+
int CountCopyAndMove::DefaultConstructions = 0;
14+
int CountCopyAndMove::ValueConstructions = 0;
1415
int CountCopyAndMove::CopyConstructions = 0;
1516
int CountCopyAndMove::CopyAssignments = 0;
1617
int CountCopyAndMove::MoveConstructions = 0;

llvm/unittests/ADT/CountCopyAndMove.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,17 @@
1212
namespace llvm {
1313

1414
struct CountCopyAndMove {
15-
static int Constructions;
15+
static int DefaultConstructions;
16+
static int ValueConstructions;
1617
static int CopyConstructions;
1718
static int CopyAssignments;
1819
static int MoveConstructions;
1920
static int MoveAssignments;
2021
static int Destructions;
2122
int val;
2223

23-
CountCopyAndMove() { ++Constructions; }
24-
explicit CountCopyAndMove(int val) : val(val) { ++Constructions; }
24+
CountCopyAndMove() { ++DefaultConstructions; }
25+
explicit CountCopyAndMove(int val) : val(val) { ++ValueConstructions; }
2526
CountCopyAndMove(const CountCopyAndMove &other) : val(other.val) {
2627
++CopyConstructions;
2728
}
@@ -41,7 +42,8 @@ struct CountCopyAndMove {
4142
~CountCopyAndMove() { ++Destructions; }
4243

4344
static void ResetCounts() {
44-
Constructions = 0;
45+
DefaultConstructions = 0;
46+
ValueConstructions = 0;
4547
CopyConstructions = 0;
4648
CopyAssignments = 0;
4749
MoveConstructions = 0;
@@ -50,7 +52,7 @@ struct CountCopyAndMove {
5052
}
5153

5254
static int TotalConstructions() {
53-
return Constructions + MoveConstructions + CopyConstructions;
55+
return DefaultConstructions + ValueConstructions + MoveConstructions + CopyConstructions;
5456
}
5557

5658
static int TotalCopies() { return CopyConstructions + CopyAssignments; }

0 commit comments

Comments
 (0)