File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 10
10
11
11
using namespace llvm ;
12
12
13
- int CountCopyAndMove::Constructions = 0 ;
13
+ int CountCopyAndMove::DefaultConstructions = 0 ;
14
+ int CountCopyAndMove::ValueConstructions = 0 ;
14
15
int CountCopyAndMove::CopyConstructions = 0 ;
15
16
int CountCopyAndMove::CopyAssignments = 0 ;
16
17
int CountCopyAndMove::MoveConstructions = 0 ;
Original file line number Diff line number Diff line change 12
12
namespace llvm {
13
13
14
14
struct CountCopyAndMove {
15
- static int Constructions;
15
+ static int DefaultConstructions;
16
+ static int ValueConstructions;
16
17
static int CopyConstructions;
17
18
static int CopyAssignments;
18
19
static int MoveConstructions;
19
20
static int MoveAssignments;
20
21
static int Destructions;
21
22
int val;
22
23
23
- CountCopyAndMove () { ++Constructions ; }
24
- explicit CountCopyAndMove (int val) : val(val) { ++Constructions ; }
24
+ CountCopyAndMove () { ++DefaultConstructions ; }
25
+ explicit CountCopyAndMove (int val) : val(val) { ++ValueConstructions ; }
25
26
CountCopyAndMove (const CountCopyAndMove &other) : val(other.val) {
26
27
++CopyConstructions;
27
28
}
@@ -41,7 +42,8 @@ struct CountCopyAndMove {
41
42
~CountCopyAndMove () { ++Destructions; }
42
43
43
44
static void ResetCounts () {
44
- Constructions = 0 ;
45
+ DefaultConstructions = 0 ;
46
+ ValueConstructions = 0 ;
45
47
CopyConstructions = 0 ;
46
48
CopyAssignments = 0 ;
47
49
MoveConstructions = 0 ;
@@ -50,7 +52,7 @@ struct CountCopyAndMove {
50
52
}
51
53
52
54
static int TotalConstructions () {
53
- return Constructions + MoveConstructions + CopyConstructions;
55
+ return DefaultConstructions + ValueConstructions + MoveConstructions + CopyConstructions;
54
56
}
55
57
56
58
static int TotalCopies () { return CopyConstructions + CopyAssignments; }
You can’t perform that action at this time.
0 commit comments