-template<class SuperType>
-class PlaceholderValue : public SuperType {
- ValID D;
- int LineNum;
-public:
- PlaceholderValue(const Type *Ty, const ValID &d) : SuperType(Ty), D(d) {
- LineNum = llvmAsmlineno;
+ bool operator<(const ValID &V) const {
+ if (Type != V.Type) return Type < V.Type;
+ switch (Type) {
+ case LocalID:
+ case GlobalID: return Num < V.Num;
+ case LocalName:
+ case GlobalName: return *Name < *V.Name;
+ case ConstSIntVal: return ConstPool64 < V.ConstPool64;
+ case ConstUIntVal: return UConstPool64 < V.UConstPool64;
+ case ConstFPVal: return ConstPoolFP->compare(*V.ConstPoolFP) ==
+ APFloat::cmpLessThan;
+ case ConstNullVal: return false;
+ case ConstUndefVal: return false;
+ case ConstZeroVal: return false;
+ case ConstantVal: return ConstantValue < V.ConstantValue;
+ default: assert(0 && "Unknown value type!"); return false;
+ }