LLVM API Documentation

llvm::AbstractTypeUser Class Reference

LLVM Abstract Type User Representation. More...

#include <AbstractTypeUser.h>

Inheritance diagram for llvm::AbstractTypeUser:

Inheritance graph
[legend]
List of all members.

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 ()

Detailed Description

LLVM Abstract Type User Representation.

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.


Constructor & Destructor Documentation

AbstractTypeUser::~AbstractTypeUser (  )  [protected, virtual]

Definition at line 34 of file Type.cpp.


Member Function Documentation

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]

Implemented in llvm::DerivedType, llvm::SymbolTable, llvm::Type, llvm::TypeSymbolTable, and llvm::ValueMap< ValType, TypeClass, ConstantClass, HasLargeKey >.


The documentation for this class was generated from the following files: