X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FValue.h;h=628e32cedbd2539686e55915435cc121e4fb49e6;hb=1bc33a5227d6d4b9e1da6fbde1c8369921e3fba5;hp=f6bd144676f5f38f52e79a976d4f7f42c5ccdbe0;hpb=cb09cc268b510e99d40b3518c5a390369ae3ffd5;p=oota-llvm.git diff --git a/include/llvm/Value.h b/include/llvm/Value.h index f6bd144676f..628e32cedbd 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -1,4 +1,4 @@ -//===-- llvm/Value.h - Definition of the Value class -------------*- C++ -*--=// +//===-- llvm/Value.h - Definition of the Value class ------------*- C++ -*-===// // // This file defines the very important Value class. This is subclassed by a // bunch of other important classes, like Instruction, Function, Type, etc... @@ -34,9 +34,7 @@ class SymbolTable; /// Value - The base class of all values computed by a program that may be used /// as operands to other values. /// -class Value : public Annotable, // Values are annotable - public AbstractTypeUser { // Values use potentially abstract types -public: +struct Value : public Annotable { // Values are annotable enum ValueTy { TypeVal, // This is an instance of Type ConstantVal, // This is an instance of Constant @@ -50,7 +48,7 @@ public: private: std::vector Uses; std::string Name; - PATypeHandle Ty; + PATypeHolder Ty; ValueTy VTy; void operator=(const Value &); // Do not implement @@ -61,7 +59,7 @@ public: /// dump - Support for debugging, callable in GDB: V->dump() // - void dump() const; + virtual void dump() const; /// print - Implement operator<< on Value... /// @@ -89,12 +87,10 @@ public: /// void replaceAllUsesWith(Value *V); - /// 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. - /// - virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy); - + // uncheckedReplaceAllUsesWith - Just like replaceAllUsesWith but dangerous. + // Only use when in type resolution situations! + void uncheckedReplaceAllUsesWith(Value *V); + //---------------------------------------------------------------------- // Methods for handling the vector of uses of this Value. //