clang API Documentation
#include <CodeGenTBAA.h>
Public Member Functions | |
CodeGenTBAA (ASTContext &Ctx, llvm::LLVMContext &VMContext, const CodeGenOptions &CGO, const LangOptions &Features, MangleContext &MContext) | |
~CodeGenTBAA () | |
llvm::MDNode * | getTBAAInfo (QualType QTy) |
llvm::MDNode * | getTBAAInfoForVTablePtr () |
llvm::MDNode * | getTBAAStructInfo (QualType QTy) |
llvm::MDNode * | getTBAAStructTypeInfo (QualType QType) |
Get the MDNode in the type DAG for given struct type QType. | |
llvm::MDNode * | getTBAAStructTagInfo (QualType BaseQType, llvm::MDNode *AccessNode, uint64_t Offset) |
Return a TBAA tag node for both scalar TBAA and struct-path aware TBAA. | |
llvm::MDNode * | getTBAAScalarTagInfo (llvm::MDNode *AccessNode) |
Get the scalar tag MDNode for a given scalar type. |
CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types.
Definition at line 48 of file CodeGenTBAA.h.
CodeGenTBAA::CodeGenTBAA | ( | ASTContext & | Ctx, |
llvm::LLVMContext & | VMContext, | ||
const CodeGenOptions & | CGO, | ||
const LangOptions & | Features, | ||
MangleContext & | MContext | ||
) |
Definition at line 32 of file CodeGenTBAA.cpp.
Definition at line 39 of file CodeGenTBAA.cpp.
llvm::MDNode * CodeGenTBAA::getTBAAInfo | ( | QualType | QTy | ) |
getTBAAInfo - Get the TBAA MDNode to be used for a dereference of the given type.
Definition at line 88 of file CodeGenTBAA.cpp.
References clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), clang::ASTContext::Int128Ty, clang::ASTContext::IntTy, clang::ASTContext::LongLongTy, clang::ASTContext::LongTy, clang::MangleContext::mangleTypeName(), clang::ASTContext::ShortTy, and TypeHasMayAlias().
Referenced by clang::CodeGen::CodeGenModule::getTBAAInfo(), and getTBAAStructTypeInfo().
llvm::MDNode * CodeGenTBAA::getTBAAInfoForVTablePtr | ( | ) |
getTBAAInfoForVTablePtr - Get the TBAA MDNode to be used for a dereference of a vtable pointer.
Definition at line 166 of file CodeGenTBAA.cpp.
Referenced by clang::CodeGen::CodeGenModule::getTBAAInfoForVTablePtr().
llvm::MDNode * CodeGenTBAA::getTBAAScalarTagInfo | ( | llvm::MDNode * | AccessNode | ) |
Get the scalar tag MDNode for a given scalar type.
Definition at line 313 of file CodeGenTBAA.cpp.
Referenced by clang::CodeGen::CodeGenModule::DecorateInstruction(), and getTBAAStructTagInfo().
llvm::MDNode * CodeGenTBAA::getTBAAStructInfo | ( | QualType | QTy | ) |
getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type.
Definition at line 213 of file CodeGenTBAA.cpp.
References clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), and TypeHasMayAlias().
Referenced by clang::CodeGen::CodeGenModule::getTBAAStructInfo().
llvm::MDNode * CodeGenTBAA::getTBAAStructTagInfo | ( | QualType | BaseQType, |
llvm::MDNode * | AccessNode, | ||
uint64_t | Offset | ||
) |
Return a TBAA tag node for both scalar TBAA and struct-path aware TBAA.
Get the tag MDNode for a given base type, the actual scalar access MDNode and offset into the base type.
Definition at line 288 of file CodeGenTBAA.cpp.
References clang::ASTContext::getCanonicalType(), getTBAAScalarTagInfo(), getTBAAStructTypeInfo(), clang::CanQual< T >::getTypePtr(), and isTBAAPathStruct().
Referenced by clang::CodeGen::CodeGenModule::getTBAAStructTagInfo().
llvm::MDNode * CodeGenTBAA::getTBAAStructTypeInfo | ( | QualType | QType | ) |
Get the MDNode in the type DAG for given struct type QType.
Definition at line 242 of file CodeGenTBAA.cpp.
References clang::Type::getAs(), clang::ASTContext::getASTRecordLayout(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getCharWidth(), clang::RecordDecl::getDefinition(), clang::ASTRecordLayout::getFieldOffset(), clang::NamedDecl::getName(), getTBAAInfo(), clang::CanQual< T >::getTypePtr(), isTBAAPathStruct(), and clang::MangleContext::mangleTypeName().
Referenced by getTBAAStructTagInfo(), and clang::CodeGen::CodeGenModule::getTBAAStructTypeInfo().