15 #ifndef LLVM_CLANG_LIB_CODEGEN_CODEGENTBAA_H
16 #define LLVM_CLANG_LIB_CODEGEN_CODEGENTBAA_H
19 #include "llvm/ADT/DenseMap.h"
20 #include "llvm/IR/MDBuilder.h"
55 llvm::MDBuilder MDHelper;
59 llvm::DenseMap<const Type *, llvm::MDNode *> MetadataCache;
61 llvm::DenseMap<const Type *, llvm::MDNode *> StructTypeMetadataCache;
63 llvm::DenseMap<TBAAPathTag, llvm::MDNode *> StructTagMetadataCache;
65 llvm::DenseMap<const llvm::MDNode *, llvm::MDNode *> ScalarTagMetadataCache;
69 llvm::DenseMap<const Type *, llvm::MDNode *> StructMetadataCache;
76 llvm::MDNode *getRoot();
80 llvm::MDNode *getChar();
84 bool CollectFields(uint64_t BaseOffset,
92 llvm::MDNode *createTBAAScalarType(StringRef Name, llvm::MDNode *Parent);
118 llvm::MDNode *AccessNode, uint64_t
Offset);
CodeGenTBAA(ASTContext &Ctx, llvm::LLVMContext &VMContext, const CodeGenOptions &CGO, const LangOptions &Features, MangleContext &MContext)
const llvm::MDNode * AccessN
static unsigned getHashValue(const clang::CodeGen::TBAAPathTag &Val)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
llvm::MDNode * getTBAAInfoForVTablePtr()
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
llvm::MDNode * getTBAAStructTypeInfo(QualType QType)
Get the MDNode in the type DAG for given struct type QType.
llvm::MDNode * getTBAAScalarTagInfo(llvm::MDNode *AccessNode)
Get the scalar tag MDNode for a given scalar type.
TBAAPathTag(const Type *B, const llvm::MDNode *A, uint64_t O)
static clang::CodeGen::TBAAPathTag getEmptyKey()
llvm::MDNode * getTBAAStructInfo(QualType QTy)
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 * getTBAAInfo(QualType QTy)
static clang::CodeGen::TBAAPathTag getTombstoneKey()
static bool isEqual(const clang::CodeGen::TBAAPathTag &LHS, const clang::CodeGen::TBAAPathTag &RHS)