LLVM API Documentation
#include <AbstractTypeUser.h>
Inheritance diagram for llvm::AbstractTypeUser:
Public Member Functions | |
virtual void | refineAbstractType (const DerivedType *OldTy, const Type *NewTy)=0 |
virtual void | typeBecameConcrete (const DerivedType *AbsTy)=0 |
virtual void | dump () const=0 |
Protected Member Functions | |
virtual | ~AbstractTypeUser () |
The AbstractTypeUser class is an interface to be implemented by classes who could possibly use an abstract type. Abstract types are denoted by the isAbstract flag set to true in the Type class. These are classes that contain an Opaque type in their structure somewhere.
Classes must implement this interface so that they may be notified when an abstract type is resolved. Abstract types may be resolved into more concrete types through: linking, parsing, and bytecode reading. When this happens, all of the users of the type must be updated to reference the new, more concrete type. They are notified through the AbstractTypeUser interface.
In addition to this, AbstractTypeUsers must keep the use list of the potentially abstract type that they reference up-to-date. To do this in a nice, transparent way, the PATypeHandle class is used to hold "Potentially Abstract Types", and keep the use list of the abstract types up-to-date.
Definition at line 48 of file AbstractTypeUser.h.
AbstractTypeUser::~AbstractTypeUser | ( | ) | [protected, virtual] |
virtual void llvm::AbstractTypeUser::refineAbstractType | ( | const DerivedType * | OldTy, | |
const Type * | NewTy | |||
) | [pure virtual] |
refineAbstractType - The callback method invoked when an abstract type is resolved to another type. An object must override this method to update its internal state to reference NewType instead of OldType.
Implemented in llvm::FunctionType, llvm::StructType, llvm::ArrayType, llvm::PackedType, llvm::PointerType, llvm::OpaqueType, and llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >.
virtual void llvm::AbstractTypeUser::typeBecameConcrete | ( | const DerivedType * | AbsTy | ) | [pure virtual] |
The other case which AbstractTypeUsers must be aware of is when a type makes the transition from being abstract (where it has clients on it's AbstractTypeUsers list) to concrete (where it does not). This method notifies ATU's when this occurs for a type.
Implemented in llvm::FunctionType, llvm::StructType, llvm::ArrayType, llvm::PackedType, llvm::PointerType, llvm::OpaqueType, and llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >.
virtual void llvm::AbstractTypeUser::dump | ( | ) | const [pure virtual] |