File tree 11 files changed +39
-4
lines changed
11 files changed +39
-4
lines changed Original file line number Diff line number Diff line change @@ -60,8 +60,12 @@ class TypeSourceInfo;
60
60
61
61
static char ID;
62
62
63
- ImportError () : Error(Unknown) { }
64
- ImportError (const ImportError &Other) : Error(Other.Error) { }
63
+ ImportError () : Error(Unknown) {}
64
+ ImportError (const ImportError &Other) : Error(Other.Error) {}
65
+ ImportError &operator =(const ImportError &Other) {
66
+ Error = Other.Error ;
67
+ return *this ,
68
+ }
65
69
ImportError (ErrorKind Error) : Error(Error) { }
66
70
67
71
std::string toString () const ;
Original file line number Diff line number Diff line change @@ -36,6 +36,12 @@ struct ObjCMethodList {
36
36
: MethodAndHasMoreThanOneDecl(L.MethodAndHasMoreThanOneDecl),
37
37
NextAndExtraBits (L.NextAndExtraBits) {}
38
38
39
+ ObjCMethodList &operator =(const ObjCMethodList &L) {
40
+ MethodAndHasMoreThanOneDecl = L.MethodAndHasMoreThanOneDecl ;
41
+ NextAndExtraBits = L.NextAndExtraBits ;
42
+ return *this ;
43
+ }
44
+
39
45
ObjCMethodList *getNext () const { return NextAndExtraBits.getPointer (); }
40
46
unsigned getBits () const { return NextAndExtraBits.getInt (); }
41
47
void setNext (ObjCMethodList *L) { NextAndExtraBits.setPointer (L); }
Original file line number Diff line number Diff line change @@ -1415,6 +1415,8 @@ template <typename R> struct result_pair {
1415
1415
result_pair (std::size_t Index, IterOfRange<R> Iter)
1416
1416
: Index(Index), Iter(Iter) {}
1417
1417
1418
+ result_pair<R>(const result_pair<R> &Other)
1419
+ : Index(Other.Index), Iter(Other.Iter) {}
1418
1420
result_pair<R> &operator =(const result_pair<R> &Other) {
1419
1421
Index = Other.Index ;
1420
1422
Iter = Other.Iter ;
@@ -1463,6 +1465,7 @@ class enumerator_iter
1463
1465
return Result.Iter == RHS.Result .Iter ;
1464
1466
}
1465
1467
1468
+ enumerator_iter<R>(const enumerator_iter<R> &Other) : Result(Other.Result) {}
1466
1469
enumerator_iter<R> &operator =(const enumerator_iter<R> &Other) {
1467
1470
Result = Other.Result ;
1468
1471
return *this ;
Original file line number Diff line number Diff line change @@ -39,6 +39,7 @@ class DbiModuleSourceFilesIterator
39
39
DbiModuleSourceFilesIterator (const DbiModuleList &Modules, uint32_t Modi,
40
40
uint16_t Filei);
41
41
DbiModuleSourceFilesIterator () = default ;
42
+ DbiModuleSourceFilesIterator (const DbiModuleSourceFilesIterator &R) = default ;
42
43
DbiModuleSourceFilesIterator &
43
44
operator =(const DbiModuleSourceFilesIterator &R) = default ;
44
45
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ class HashTableIterator
56
56
}
57
57
}
58
58
59
+ HashTableIterator (const HashTableIterator &R) : Map(R.Map) {}
59
60
HashTableIterator &operator =(const HashTableIterator &R) {
60
61
Map = R.Map ;
61
62
return *this ;
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ struct DiagnosticPredicate {
174
174
: DiagnosticPredicateTy::NearMatch) {}
175
175
DiagnosticPredicate (DiagnosticPredicateTy T) : Type(T) {}
176
176
DiagnosticPredicate (const DiagnosticPredicate &) = default ;
177
+ DiagnosticPredicate& operator =(const DiagnosticPredicate &) = default ;
177
178
178
179
operator bool () const { return Type == DiagnosticPredicateTy::Match; }
179
180
bool isMatch () const { return Type == DiagnosticPredicateTy::Match; }
Original file line number Diff line number Diff line change @@ -274,6 +274,7 @@ template <typename T> class FixedStreamArray {
274
274
return !(*this == Other);
275
275
}
276
276
277
+ FixedStreamArray (const FixedStreamArray &) = default ;
277
278
FixedStreamArray &operator =(const FixedStreamArray &) = default ;
278
279
279
280
const T &operator [](uint32_t Index) const {
@@ -323,6 +324,8 @@ class FixedStreamArrayIterator
323
324
FixedStreamArrayIterator (const FixedStreamArray<T> &Array, uint32_t Index)
324
325
: Array(Array), Index(Index) {}
325
326
327
+ FixedStreamArrayIterator<T>(const FixedStreamArrayIterator<T> &Other)
328
+ : Array(Other.Array), Index(Other.Index) {}
326
329
FixedStreamArrayIterator<T> &
327
330
operator =(const FixedStreamArrayIterator<T> &Other) {
328
331
Array = Other.Array ;
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ class TimerGroup {
174
174
std::string Description;
175
175
176
176
PrintRecord (const PrintRecord &Other) = default ;
177
+ PrintRecord &operator =(const PrintRecord &Other) = default ;
177
178
PrintRecord (const TimeRecord &Time, const std::string &Name,
178
179
const std::string &Description)
179
180
: Time(Time), Name(Name), Description(Description) {}
Original file line number Diff line number Diff line change @@ -134,11 +134,21 @@ namespace {
134
134
uint32_t properties () const ;
135
135
unsigned size () const { return Size ; }
136
136
137
- LatticeCell &operator = (const LatticeCell &L) {
137
+ LatticeCell (const LatticeCell &L) {
138
+ // This memcpy also copies Properties (when L.Size == 0).
139
+ uint32_t N =
140
+ L.IsSpecial ? sizeof L.Properties : L.Size * sizeof (const Constant *);
141
+ memcpy (Values, L.Values , N);
142
+ Kind = L.Kind ;
143
+ Size = L.Size ;
144
+ IsSpecial = L.IsSpecial ;
145
+ }
146
+
147
+ LatticeCell &operator =(const LatticeCell &L) {
138
148
if (this != &L) {
139
149
// This memcpy also copies Properties (when L.Size == 0).
140
150
uint32_t N = L.IsSpecial ? sizeof L.Properties
141
- : L.Size * sizeof (const Constant*);
151
+ : L.Size * sizeof (const Constant *);
142
152
memcpy (Values, L.Values , N);
143
153
Kind = L.Kind ;
144
154
Size = L.Size ;
Original file line number Diff line number Diff line change @@ -93,6 +93,10 @@ namespace {
93
93
RegisterSet () = default ;
94
94
explicit RegisterSet (unsigned s, bool t = false ) : BitVector(s, t) {}
95
95
RegisterSet (const RegisterSet &RS) : BitVector(RS) {}
96
+ RegisterSet &operator =(const RegisterSet &RS) {
97
+ BitVector::operator =(RS);
98
+ return *this ;
99
+ }
96
100
97
101
using BitVector::clear;
98
102
Original file line number Diff line number Diff line change @@ -194,6 +194,7 @@ struct TypeSetByHwMode : public InfoByHwMode<MachineValueTypeSet> {
194
194
195
195
TypeSetByHwMode () = default ;
196
196
TypeSetByHwMode (const TypeSetByHwMode &VTS) = default ;
197
+ TypeSetByHwMode &operator =(const TypeSetByHwMode &) = default ;
197
198
TypeSetByHwMode (MVT::SimpleValueType VT)
198
199
: TypeSetByHwMode(ValueTypeByHwMode(VT)) {}
199
200
TypeSetByHwMode (ValueTypeByHwMode VT)
You can’t perform that action at this time.
0 commit comments