parent
f208dcfa2b
commit
5950852469
|
@ -217,10 +217,7 @@ protected:
|
||||||
ConstPoolPointer(const PointerType *T);
|
ConstPoolPointer(const PointerType *T);
|
||||||
~ConstPoolPointer() {}
|
~ConstPoolPointer() {}
|
||||||
public:
|
public:
|
||||||
static ConstPoolPointer *getNullPointer(const PointerType *T) {
|
static ConstPoolPointer *getNull(const PointerType *T);
|
||||||
// FIXME: These should all be shared!
|
|
||||||
return new ConstPoolPointer(T);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual string getStrValue() const;
|
virtual string getStrValue() const;
|
||||||
};
|
};
|
||||||
|
|
|
@ -46,7 +46,14 @@ public:
|
||||||
inline ConstPoolVal *getInitializer() {
|
inline ConstPoolVal *getInitializer() {
|
||||||
return (ConstPoolVal*)Operands[0].get();
|
return (ConstPoolVal*)Operands[0].get();
|
||||||
}
|
}
|
||||||
inline void setInitializer(ConstPoolVal *CPV) { Operands[0] = (Value*)CPV; }
|
inline void setInitializer(ConstPoolVal *CPV) {
|
||||||
|
if (CPV == 0) {
|
||||||
|
if (hasInitializer()) Operands.pop_back();
|
||||||
|
} else {
|
||||||
|
if (!hasInitializer()) Operands.push_back(Use(0, this));
|
||||||
|
Operands[0] = (Value*)CPV;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// If the value is a global constant, its value is immutable throughout the
|
// If the value is a global constant, its value is immutable throughout the
|
||||||
|
|
Loading…
Reference in New Issue