LLVM API Documentation
#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 "llvm/Support/MathExtras.h"
#include <algorithm>
#include <iostream>
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::TypeMapBase |
class | llvm::TypeMap< ValType, TypeClass > |
class | llvm::FunctionValType |
class | llvm::ArrayValType |
class | llvm::PackedValType |
class | llvm::StructValType |
class | llvm::PointerValType |
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) |
static unsigned | getSubElementHash (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 |
static bool AbstractTypeHasCycleThrough | ( | const Type * | TargetTy, | |
const Type * | CurTy, | |||
std::set< const Type * > & | VisitedTypes | |||
) | [static] |
Definition at line 643 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 658 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 327 of file Type.cpp.
References getTypeDescription(), I, and Ty.
Referenced by llvm::Type::getDescription().
static unsigned getSubElementHash | ( | const Type * | Ty | ) | [static] |
getSubElementHash - Generate a hash value for all of the SubType's of this type. The hash value is guaranteed to be zero if any of the subtypes are an opaque type. Otherwise we try to mix them in as well as possible, but do not look at the subtype's subtype's.
Definition at line 695 of file Type.cpp.
References llvm::Type::ArrayTyID, E, llvm::Type::FunctionTyID, llvm::Type::getTypeID(), I, llvm::Type::OpaqueTyID, llvm::Type::PackedTyID, llvm::Type::StructTyID, llvm::Type::subtype_begin(), llvm::Type::subtype_end(), and Ty.
Referenced by llvm::PointerValType::hashTypeStructure().
static std::string getTypeDescription | ( | const Type * | Ty, | |
std::vector< const Type * > & | TypeStack | |||
) | [static] |
Definition at line 232 of file Type.cpp.
References AbstractTypeDescriptions, llvm::Type::ArrayTyID, ConcreteTypeDescriptions, E, llvm::StructType::element_begin(), llvm::StructType::element_end(), llvm::Type::FunctionTyID, llvm::SequentialType::getElementType(), llvm::PackedType::getNumElements(), llvm::ArrayType::getNumElements(), I, llvm::Type::PackedTyID, llvm::Type::PointerTyID, Slot, llvm::Type::StructTyID, Ty, 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 674 of file Type.cpp.
References AbstractTypeHasCycleThrough(), ConcreteTypeHasCycleThrough(), E, I, llvm::Type::isAbstract(), llvm::Type::subtype_begin(), llvm::Type::subtype_end(), and Ty.
Referenced by llvm::TypeMap< ValType, TypeClass >::RefineAbstractType().
static bool TypesEqual | ( | const Type * | Ty, | |
const Type * | Ty2, | |||
std::map< const Type *, const Type * > & | EqTypes | |||
) | [static] |
Definition at line 581 of file Type.cpp.
References llvm::SequentialType::getElementType(), llvm::StructType::getElementType(), llvm::PackedType::getNumElements(), llvm::StructType::getNumElements(), llvm::FunctionType::getNumParams(), llvm::FunctionType::getParamType(), llvm::FunctionType::getReturnType(), llvm::Type::getTypeID(), llvm::FunctionType::isVarArg(), and Ty.
Referenced by llvm::TypeMap< ValType, TypeClass >::RefineAbstractType(), and TypesEqual().
std::map<const Type*, std::string> AbstractTypeDescriptions [static] |
Definition at line 44 of file Type.cpp.
Referenced by llvm::Type::getDescription(), getTypeDescription(), and llvm::DerivedType::refineAbstractTypeTo().
TypeMap<ArrayValType, ArrayType> ArrayTypes [static] |
Definition at line 1034 of file Type.cpp.
Referenced by llvm::Type::clearAllTypeMaps(), llvm::ArrayType::get(), llvm::ArrayType::refineAbstractType(), and llvm::ArrayType::typeBecameConcrete().
std::map<const Type*, std::string> ConcreteTypeDescriptions [static] |
Definition at line 43 of file Type.cpp.
Referenced by llvm::Type::getDescription(), getTypeDescription(), and llvm::Type::Type().
TypeMap<FunctionValType, FunctionType> FunctionTypes [static] |
Definition at line 976 of file Type.cpp.
Referenced by llvm::Type::clearAllTypeMaps(), llvm::FunctionType::get(), llvm::FunctionType::refineAbstractType(), and llvm::FunctionType::typeBecameConcrete().
TypeMap<PackedValType, PackedType> PackedTypes [static] |
Definition at line 1084 of file Type.cpp.
Referenced by llvm::Type::clearAllTypeMaps(), llvm::PackedType::get(), llvm::PackedType::refineAbstractType(), and llvm::PackedType::typeBecameConcrete().
TypeMap<PointerValType, PointerType> PointerTypes [static] |
Definition at line 1191 of file Type.cpp.
Referenced by llvm::Type::clearAllTypeMaps(), llvm::PointerType::get(), RecursiveResolveTypes(), llvm::PointerType::refineAbstractType(), and llvm::PointerType::typeBecameConcrete().
TypeMap<StructValType, StructType> StructTypes [static] |
Definition at line 1141 of file Type.cpp.
Referenced by llvm::Type::clearAllTypeMaps(), llvm::StructType::get(), llvm::StructType::refineAbstractType(), and llvm::StructType::typeBecameConcrete().