mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-26 07:29:55 +00:00
add some WeakVH::operator='s. Without these, assigning
a Value* to a WeakVH was constructing a temporary WeakVH (due to the implicit assignment operator). This avoids that cost. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83704 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fc61aeff2c
commit
f6811274e1
@ -54,6 +54,8 @@ private:
|
|||||||
PointerIntPair<ValueHandleBase**, 2, HandleBaseKind> PrevPair;
|
PointerIntPair<ValueHandleBase**, 2, HandleBaseKind> PrevPair;
|
||||||
ValueHandleBase *Next;
|
ValueHandleBase *Next;
|
||||||
Value *VP;
|
Value *VP;
|
||||||
|
|
||||||
|
explicit ValueHandleBase(const ValueHandleBase&); // DO NOT IMPLEMENT.
|
||||||
public:
|
public:
|
||||||
explicit ValueHandleBase(HandleBaseKind Kind)
|
explicit ValueHandleBase(HandleBaseKind Kind)
|
||||||
: PrevPair(0, Kind), Next(0), VP(0) {}
|
: PrevPair(0, Kind), Next(0), VP(0) {}
|
||||||
@ -131,6 +133,13 @@ public:
|
|||||||
WeakVH(const WeakVH &RHS)
|
WeakVH(const WeakVH &RHS)
|
||||||
: ValueHandleBase(Weak, RHS) {}
|
: ValueHandleBase(Weak, RHS) {}
|
||||||
|
|
||||||
|
Value *operator=(Value *RHS) {
|
||||||
|
return ValueHandleBase::operator=(RHS);
|
||||||
|
}
|
||||||
|
Value *operator=(const ValueHandleBase &RHS) {
|
||||||
|
return ValueHandleBase::operator=(RHS);
|
||||||
|
}
|
||||||
|
|
||||||
operator Value*() const {
|
operator Value*() const {
|
||||||
return getValPtr();
|
return getValPtr();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user