mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
There is no reason for Value to be an AbstractTypeUser. This just makes things
significantly more complete. Instead, just make DerivedType's AbstractTypeUser's, and make Value contain a PATypeHolder. This will also be more efficient in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8827 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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<User *> 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...
|
||||
///
|
||||
@@ -93,12 +91,6 @@ public:
|
||||
// Only use when in type resolution situations!
|
||||
void uncheckedReplaceAllUsesWith(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);
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// Methods for handling the vector of uses of this Value.
|
||||
//
|
||||
|
Reference in New Issue
Block a user