clang
24.0.0git
include
clang
CodeGenUtils
TBAAUtils.h
Go to the documentation of this file.
1
//===--- TBAAUtils.h - Shared TBAA queries ----------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This file holds the AST queries that both classic CodeGen and CIR CodeGen
10
// need while computing type-based alias analysis (TBAA) information.
11
//
12
//===----------------------------------------------------------------------===//
13
14
#ifndef LLVM_CLANG_CODEGENUTILS_TBAAUTILS_H
15
#define LLVM_CLANG_CODEGENUTILS_TBAAUTILS_H
16
17
#include "
clang/AST/Type.h
"
18
19
namespace
clang
{
20
class
ASTContext
;
21
}
// namespace clang
22
23
namespace
clang::CodeGenUtils
{
24
25
/// Returns true if accesses to objects of type \p QTy are in the general char
26
/// alias class because of a may_alias attribute.
27
bool
typeHasMayAlias
(QualType QTy);
28
29
/// Returns true if \p QTy is a valid base type to be used in TBAA access tags.
30
bool
isValidTBAABaseType
(QualType QTy);
31
32
/// Returns the signed type whose TBAA type node an access to the unsigned
33
/// builtin type \p BTy uses, or a null type if \p BTy has its own node.
34
QualType
getTBAASignedCounterpart
(
const
ASTContext &Ctx,
35
const
BuiltinType *BTy);
36
37
}
// namespace clang::CodeGenUtils
38
39
#endif
// LLVM_CLANG_CODEGENUTILS_TBAAUTILS_H
Type.h
C Language Family Type Representation.
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition
ASTContext.h:246
clang::CodeGenUtils
Definition
CallUtils.h:26
clang::CodeGenUtils::typeHasMayAlias
bool typeHasMayAlias(QualType QTy)
Returns true if accesses to objects of type QTy are in the general char alias class because of a may_...
Definition
TBAAUtils.cpp:16
clang::CodeGenUtils::getTBAASignedCounterpart
QualType getTBAASignedCounterpart(const ASTContext &Ctx, const BuiltinType *BTy)
Returns the signed type whose TBAA type node an access to the unsigned builtin type BTy uses,...
Definition
TBAAUtils.cpp:55
clang::CodeGenUtils::isValidTBAABaseType
bool isValidTBAABaseType(QualType QTy)
Returns true if QTy is a valid base type to be used in TBAA access tags.
Definition
TBAAUtils.cpp:40
clang
Top level wrappers for InstallAPI frontend operations.
Definition
CalledOnceCheck.h:17
Generated on
for clang by
1.14.0