LLVM API Documentation

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Type.cpp File Reference

#include "llvm/AbstractTypeUser.h"
#include "llvm/DerivedTypes.h"
#include "llvm/SymbolTable.h"
#include "llvm/Constants.h"
#include "llvm/ADT/DepthFirstIterator.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/ADT/SCCIterator.h"
#include "llvm/ADT/STLExtras.h"
#include <algorithm>
#include <iostream>
#include "llvm/Type.def"

Include dependency graph for Type.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  TypePromotionGraph
struct  llvm::GraphTraits< TypePromotionGraph >
class  llvm::TypeMap< ValType, TypeClass >
class  llvm::FunctionValType
class  llvm::ArrayValType
class  llvm::PackedValType
class  llvm::StructValType
class  llvm::PointerValType

Defines

#define HANDLE_PRIM_TYPE(TY, SIZE)   case TY##TyID: return SIZE;

Functions

static std::string getTypeDescription (const Type *Ty, std::vector< const Type * > &TypeStack)
static const std::string & getOrCreateDesc (std::map< const Type *, std::string > &Map, const Type *Ty)
static PrimType TheVoidTy ("void", Type::VoidTyID)
static PrimType TheBoolTy ("bool", Type::BoolTyID)
static PrimType TheSByteTy ("sbyte", Type::SByteTyID)
static PrimType TheUByteTy ("ubyte", Type::UByteTyID)
static PrimType TheShortTy ("short", Type::ShortTyID)
static PrimType TheUShortTy ("ushort", Type::UShortTyID)
static PrimType TheIntTy ("int", Type::IntTyID)
static PrimType TheUIntTy ("uint", Type::UIntTyID)
static PrimType TheLongTy ("long", Type::LongTyID)
static PrimType TheULongTy ("ulong", Type::ULongTyID)
static PrimType TheFloatTy ("float", Type::FloatTyID)
static PrimType TheDoubleTy ("double", Type::DoubleTyID)
static PrimType TheLabelTy ("label", Type::LabelTyID)
static bool TypesEqual (const Type *Ty, const Type *Ty2, std::map< const Type *, const Type * > &EqTypes)
static bool TypesEqual (const Type *Ty, const Type *Ty2)
static bool AbstractTypeHasCycleThrough (const Type *TargetTy, const Type *CurTy, std::set< const Type * > &VisitedTypes)
static bool ConcreteTypeHasCycleThrough (const Type *TargetTy, const Type *CurTy, std::set< const Type * > &VisitedTypes)
static bool TypeHasCycleThroughItself (const Type *Ty)
std::ostream & llvm::operator<< (std::ostream &OS, const Type *T)
std::ostream & llvm::operator<< (std::ostream &OS, const Type &T)

Variables

static std::map< const Type *,
std::string > 
ConcreteTypeDescriptions
static std::map< const Type *,
std::string > 
AbstractTypeDescriptions
static TypeMap< FunctionValType,
FunctionType
FunctionTypes
static TypeMap< ArrayValType,
ArrayType
ArrayTypes
static TypeMap< PackedValType,
PackedType
PackedTypes
static TypeMap< StructValType,
StructType
StructTypes
static TypeMap< PointerValType,
PointerType
PointerTypes


Define Documentation

#define HANDLE_PRIM_TYPE TY,
SIZE   )     case TY##TyID: return SIZE;
 


Function Documentation

static bool AbstractTypeHasCycleThrough const Type TargetTy,
const Type CurTy,
std::set< const Type * > &  VisitedTypes
[static]
 

Definition at line 595 of file Type.cpp.

References E, I, llvm::Type::isAbstract(), llvm::Type::subtype_begin(), and llvm::Type::subtype_end().

Referenced by TypeHasCycleThroughItself().

static bool ConcreteTypeHasCycleThrough const Type TargetTy,
const Type CurTy,
std::set< const Type * > &  VisitedTypes
[static]
 

Definition at line 610 of file Type.cpp.

References E, I, llvm::Type::subtype_begin(), and llvm::Type::subtype_end().

Referenced by TypeHasCycleThroughItself().

static const std::string& getOrCreateDesc std::map< const Type *, std::string > &  Map,
const Type Ty
[static]
 

Definition at line 288 of file Type.cpp.

References getTypeDescription(), and I.

Referenced by llvm::Type::getDescription().

static std::string getTypeDescription const Type Ty,
std::vector< const Type * > &  TypeStack
[static]
 

Definition at line 193 of file Type.cpp.

References AbstractTypeDescriptions, llvm::Type::ArrayTyID, ConcreteTypeDescriptions, Desc, E, llvm::StructType::element_begin(), llvm::StructType::element_end(), llvm::Type::FunctionTyID, llvm::SequentialType::getElementType(), llvm::PackedType::getNumElements(), llvm::ArrayType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getReturnType(), I, llvm::FunctionType::isVarArg(), llvm::Type::PackedTyID, llvm::FunctionType::param_begin(), llvm::FunctionType::param_end(), llvm::Type::PointerTyID, llvm::Type::StructTyID, and llvm::utostr().

Referenced by getOrCreateDesc().

static PrimType TheBoolTy "bool"  ,
Type::BoolTyID 
[static]
 

static PrimType TheDoubleTy "double"  ,
Type::DoubleTyID 
[static]
 

static PrimType TheFloatTy "float"  ,
Type::FloatTyID 
[static]
 

static PrimType TheIntTy "int"  ,
Type::IntTyID 
[static]
 

static PrimType TheLabelTy "label"  ,
Type::LabelTyID 
[static]
 

static PrimType TheLongTy "long"  ,
Type::LongTyID 
[static]
 

static PrimType TheSByteTy "sbyte"  ,
Type::SByteTyID 
[static]
 

static PrimType TheShortTy "short"  ,
Type::ShortTyID 
[static]
 

static PrimType TheUByteTy "ubyte"  ,
Type::UByteTyID 
[static]
 

static PrimType TheUIntTy "uint"  ,
Type::UIntTyID 
[static]
 

static PrimType TheULongTy "ulong"  ,
Type::ULongTyID 
[static]
 

static PrimType TheUShortTy "ushort"  ,
Type::UShortTyID 
[static]
 

static PrimType TheVoidTy "void"  ,
Type::VoidTyID 
[static]
 

static bool TypeHasCycleThroughItself const Type Ty  )  [static]
 

TypeHasCycleThroughItself - Return true if the specified type has a cycle back to itself.

Definition at line 626 of file Type.cpp.

References AbstractTypeHasCycleThrough(), ConcreteTypeHasCycleThrough(), E, I, llvm::Type::isAbstract(), llvm::Type::subtype_begin(), and llvm::Type::subtype_end().

Referenced by llvm::TypeMap< ValType, TypeClass >::finishRefinement().

static bool TypesEqual const Type Ty,
const Type Ty2
[static]
 

Definition at line 586 of file Type.cpp.

References TypesEqual().

static bool TypesEqual const Type Ty,
const Type Ty2,
std::map< const Type *, const Type * > &  EqTypes
[static]
 

Definition at line 533 of file Type.cpp.

References llvm::SequentialType::getElementType(), llvm::StructType::getElementType(), llvm::PackedType::getNumElements(), llvm::ArrayType::getNumElements(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::Type::getTypeID(), and llvm::FunctionType::isVarArg().

Referenced by llvm::TypeMap< ValType, TypeClass >::finishRefinement(), and TypesEqual().


Variable Documentation

std::map<const Type*, std::string> AbstractTypeDescriptions [static]
 

Definition at line 43 of file Type.cpp.

Referenced by llvm::Type::getDescription(), getTypeDescription(), and llvm::DerivedType::refineAbstractTypeTo().

TypeMap<ArrayValType, ArrayType> ArrayTypes [static]
 

Definition at line 921 of file Type.cpp.

std::map<const Type*, std::string> ConcreteTypeDescriptions [static]
 

Definition at line 42 of file Type.cpp.

Referenced by llvm::Type::getDescription(), getTypeDescription(), and llvm::Type::Type().

TypeMap<FunctionValType, FunctionType> FunctionTypes [static]
 

Definition at line 863 of file Type.cpp.

TypeMap<PackedValType, PackedType> PackedTypes [static]
 

Definition at line 971 of file Type.cpp.

TypeMap<PointerValType, PointerType> PointerTypes [static]
 

Definition at line 1077 of file Type.cpp.

Referenced by RecursiveResolveTypes().

TypeMap<StructValType, StructType> StructTypes [static]
 

Definition at line 1027 of file Type.cpp.