forked from OSchip/llvm-project
parent
97af9d5d3a
commit
e2af30a922
|
@ -146,6 +146,15 @@ public:
|
||||||
End += NumInputs;
|
End += NumInputs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void assign(unsigned NumElts, const T &Elt) {
|
||||||
|
clear();
|
||||||
|
if (NumElts > Capacity)
|
||||||
|
grow(NumElts);
|
||||||
|
End = Begin+NumElts;
|
||||||
|
for (; NumElts; --NumElts)
|
||||||
|
new (Begin+NumElts-1) T(Elt);
|
||||||
|
}
|
||||||
|
|
||||||
const SmallVector &operator=(const SmallVector &RHS) {
|
const SmallVector &operator=(const SmallVector &RHS) {
|
||||||
// Avoid self-assignment.
|
// Avoid self-assignment.
|
||||||
if (this == &RHS) return *this;
|
if (this == &RHS) return *this;
|
||||||
|
|
Loading…
Reference in New Issue