clang 20.0.0git
Public Member Functions | List of all members
clang::CodeGen::CodeGenTBAA Class Reference

CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types. More...

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CodeGenTBAA.h"

Public Member Functions

 CodeGenTBAA (ASTContext &Ctx, CodeGenTypes &CGTypes, llvm::Module &M, const CodeGenOptions &CGO, const LangOptions &Features)
 
 ~CodeGenTBAA ()
 
llvm::MDNode * getTypeInfo (QualType QTy)
 getTypeInfo - Get metadata used to describe accesses to objects of the given type.
 
TBAAAccessInfo getAccessInfo (QualType AccessType)
 getAccessInfo - Get TBAA information that describes an access to an object of the given type.
 
TBAAAccessInfo getVTablePtrAccessInfo (llvm::Type *VTablePtrType)
 getVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table pointer.
 
llvm::MDNode * getTBAAStructInfo (QualType QTy)
 getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type.
 
llvm::MDNode * getBaseTypeInfo (QualType QTy)
 getBaseTypeInfo - Get metadata that describes the given base access type.
 
llvm::MDNode * getAccessTagInfo (TBAAAccessInfo Info)
 getAccessTagInfo - Get TBAA tag for a given memory access.
 
TBAAAccessInfo mergeTBAAInfoForCast (TBAAAccessInfo SourceInfo, TBAAAccessInfo TargetInfo)
 mergeTBAAInfoForCast - Get merged TBAA information for the purpose of type casts.
 
TBAAAccessInfo mergeTBAAInfoForConditionalOperator (TBAAAccessInfo InfoA, TBAAAccessInfo InfoB)
 mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purpose of conditional operator.
 
TBAAAccessInfo mergeTBAAInfoForMemoryTransfer (TBAAAccessInfo DestInfo, TBAAAccessInfo SrcInfo)
 mergeTBAAInfoForMemoryTransfer - Get merged TBAA information for the purpose of memory transfer calls.
 

Detailed Description

CodeGenTBAA - This class organizes the cross-module state that is used while lowering AST types to LLVM types.

Definition at line 117 of file CodeGenTBAA.h.

Constructor & Destructor Documentation

◆ CodeGenTBAA()

CodeGenTBAA::CodeGenTBAA ( ASTContext Ctx,
CodeGenTypes CGTypes,
llvm::Module &  M,
const CodeGenOptions CGO,
const LangOptions Features 
)

Definition at line 36 of file CodeGenTBAA.cpp.

◆ ~CodeGenTBAA()

CodeGenTBAA::~CodeGenTBAA ( )

Definition at line 44 of file CodeGenTBAA.cpp.

Member Function Documentation

◆ getAccessInfo()

TBAAAccessInfo CodeGenTBAA::getAccessInfo ( QualType  AccessType)

◆ getAccessTagInfo()

llvm::MDNode * CodeGenTBAA::getAccessTagInfo ( TBAAAccessInfo  Info)

◆ getBaseTypeInfo()

llvm::MDNode * CodeGenTBAA::getBaseTypeInfo ( QualType  QTy)

getBaseTypeInfo - Get metadata that describes the given base access type.

Return null if the type is not suitable for use in TBAA access tags.

Definition at line 569 of file CodeGenTBAA.cpp.

References isValidBaseType().

◆ getTBAAStructInfo()

llvm::MDNode * CodeGenTBAA::getTBAAStructInfo ( QualType  QTy)

getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of the given type.

Definition at line 448 of file CodeGenTBAA.cpp.

References clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), and TypeHasMayAlias().

◆ getTypeInfo()

llvm::MDNode * CodeGenTBAA::getTypeInfo ( QualType  QTy)

getTypeInfo - Get metadata used to describe accesses to objects of the given type.

Definition at line 316 of file CodeGenTBAA.cpp.

References clang::ASTContext::getCanonicalType(), clang::CanQual< T >::getTypePtr(), clang::SanitizerSet::has(), isValidBaseType(), clang::LangOptions::Sanitize, and TypeHasMayAlias().

Referenced by getAccessInfo().

◆ getVTablePtrAccessInfo()

TBAAAccessInfo CodeGenTBAA::getVTablePtrAccessInfo ( llvm::Type *  VTablePtrType)

getVTablePtrAccessInfo - Get the TBAA information that describes an access to a virtual table pointer.

Definition at line 362 of file CodeGenTBAA.cpp.

◆ mergeTBAAInfoForCast()

TBAAAccessInfo CodeGenTBAA::mergeTBAAInfoForCast ( TBAAAccessInfo  SourceInfo,
TBAAAccessInfo  TargetInfo 
)

mergeTBAAInfoForCast - Get merged TBAA information for the purpose of type casts.

Definition at line 601 of file CodeGenTBAA.cpp.

References clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CodeGen::TBAAAccessInfo::isMayAlias().

◆ mergeTBAAInfoForConditionalOperator()

TBAAAccessInfo CodeGenTBAA::mergeTBAAInfoForConditionalOperator ( TBAAAccessInfo  InfoA,
TBAAAccessInfo  InfoB 
)

mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the purpose of conditional operator.

Definition at line 609 of file CodeGenTBAA.cpp.

References clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CodeGen::TBAAAccessInfo::isMayAlias().

◆ mergeTBAAInfoForMemoryTransfer()

TBAAAccessInfo CodeGenTBAA::mergeTBAAInfoForMemoryTransfer ( TBAAAccessInfo  DestInfo,
TBAAAccessInfo  SrcInfo 
)

mergeTBAAInfoForMemoryTransfer - Get merged TBAA information for the purpose of memory transfer calls.

Definition at line 627 of file CodeGenTBAA.cpp.

References clang::CodeGen::TBAAAccessInfo::getMayAliasInfo(), and clang::CodeGen::TBAAAccessInfo::isMayAlias().


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