Skip to content

Commit

Permalink
fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
PikachuHyA committed Nov 13, 2024
1 parent a71c42e commit 6fbb5b8
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions clang/lib/CIR/CodeGen/CIRGenTBAA.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ enum class TBAAAccessKind : unsigned {
MayAlias,
Incomplete,
};
// TBAAAccessInfo - Describes a memory access in terms of TBAA.
// Describes a memory access in terms of TBAA.
struct TBAAAccessInfo {
TBAAAccessInfo(TBAAAccessKind kind, cir::TBAAAttr baseType,
cir::TBAAAttr accessType, uint64_t offset, uint64_t size)
Expand Down Expand Up @@ -74,23 +74,23 @@ struct TBAAAccessInfo {

explicit operator bool() const { return *this != TBAAAccessInfo(); }

/// kind - The kind of the access descriptor.
/// The kind of the access descriptor.
TBAAAccessKind kind;

/// baseType - The base/leading access type. May be null if this access
/// The base/leading access type. May be null if this access
/// descriptor represents an access that is not considered to be an access
/// to an aggregate or union member.
cir::TBAAAttr baseType;

/// accessType - The final access type. May be null if there is no TBAA
/// The final access type. May be null if there is no TBAA
/// information available about this access.
cir::TBAAAttr accessType;

/// offset - The byte offset of the final access within the base one. Must be
/// The byte offset of the final access within the base one. Must be
/// zero if the base access type is not specified.
uint64_t offset;

/// size - The size of access, in bytes.
/// The size of access, in bytes.
uint64_t size;
};

Expand All @@ -110,42 +110,40 @@ class CIRGenTBAA {
const clang::CodeGenOptions &CodeGenOpts,
const clang::LangOptions &Features);

/// getTypeInfo - Get metadata used to describe accesses to objects of the
/// Get attribute used to describe accesses to objects of the
/// given type.
cir::TBAAAttr getTypeInfo(clang::QualType QTy);

/// getAccessInfo - Get TBAA information that describes an access to
/// Get TBAA information that describes an access to
/// an object of the given type.
TBAAAccessInfo getAccessInfo(clang::QualType AccessType);

/// getVTablePtrAccessInfo - Get the TBAA information that describes an
/// Get the TBAA information that describes an
/// access to a virtual table pointer.
TBAAAccessInfo getVTablePtrAccessInfo(mlir::Type VTablePtrType);

/// getTBAAStructInfo - Get the TBAAStruct MDNode to be used for a memcpy of
/// Get the TBAAStruct attributes to be used for a memcpy of
/// the given type.
mlir::ArrayAttr getTBAAStructInfo(clang::QualType QTy);

/// getBaseTypeInfo - Get metadata that describes the given base access
/// Get attribute that describes the given base access
/// type. Return null if the type is not suitable for use in TBAA access
/// tags.
cir::TBAAAttr getBaseTypeInfo(clang::QualType QTy);

/// getAccessTagInfo - Get TBAA tag for a given memory access.
/// Get TBAA tag for a given memory access.
mlir::ArrayAttr getAccessTagInfo(TBAAAccessInfo tbaaInfo);

/// mergeTBAAInfoForCast - Get merged TBAA information for the purpose of
/// Get merged TBAA information for the purpose of
/// type casts.
TBAAAccessInfo mergeTBAAInfoForCast(TBAAAccessInfo SourceInfo,
TBAAAccessInfo TargetInfo);

/// mergeTBAAInfoForConditionalOperator - Get merged TBAA information for the
/// purpose of conditional operator.
/// Get merged TBAA information for the purpose of conditional operator.
TBAAAccessInfo mergeTBAAInfoForConditionalOperator(TBAAAccessInfo InfoA,
TBAAAccessInfo InfoB);

/// mergeTBAAInfoForMemoryTransfer - Get merged TBAA information for the
/// purpose of memory transfer calls.
/// Get merged TBAA information for the purpose of memory transfer calls.
TBAAAccessInfo mergeTBAAInfoForMemoryTransfer(TBAAAccessInfo DestInfo,
TBAAAccessInfo SrcInfo);
};
Expand Down

0 comments on commit 6fbb5b8

Please sign in to comment.