+// refineAbstractType - This function is implemented because we use
+// potentially abstract types, and these types may be resolved to more
+// concrete types after we are constructed. For the value class, we simply
+// change Ty to point to the right type. :)
+//
+void Value::refineAbstractType(const DerivedType *OldTy, const Type *NewTy) {
+ assert(Ty.get() == OldTy &&"Can't refine anything but my type!");
+ if (OldTy == NewTy && !OldTy->isAbstract())
+ Ty.removeUserFromConcrete();
+ Ty = NewTy;
+}
+