#include "clang/AST/TypeNodes.inc" #include "clang/Basic/Sanitizers.def"">

clang: lib/CodeGen/CodeGenFunction.cpp File Reference (original) (raw)

#include "[CodeGenFunction.h](CodeGenFunction%5F8h%5Fsource.html)"
#include "[CGBlocks.h](CGBlocks%5F8h%5Fsource.html)"
#include "[CGCUDARuntime.h](CGCUDARuntime%5F8h%5Fsource.html)"
#include "[CGCXXABI.h](CGCXXABI%5F8h%5Fsource.html)"
#include "[CGCleanup.h](CGCleanup%5F8h%5Fsource.html)"
#include "[CGDebugInfo.h](CGDebugInfo%5F8h%5Fsource.html)"
#include "[CGHLSLRuntime.h](CGHLSLRuntime%5F8h%5Fsource.html)"
#include "[CGOpenMPRuntime.h](CGOpenMPRuntime%5F8h%5Fsource.html)"
#include "[CodeGenModule.h](CodeGenModule%5F8h%5Fsource.html)"
#include "[CodeGenPGO.h](CodeGenPGO%5F8h%5Fsource.html)"
#include "[TargetInfo.h](lib%5F2CodeGen%5F2TargetInfo%5F8h%5Fsource.html)"
#include "[clang/AST/ASTContext.h](ASTContext%5F8h%5Fsource.html)"
#include "[clang/AST/ASTLambda.h](ASTLambda%5F8h%5Fsource.html)"
#include "[clang/AST/Attr.h](AST%5F2Attr%5F8h%5Fsource.html)"
#include "[clang/AST/Decl.h](Decl%5F8h%5Fsource.html)"
#include "[clang/AST/DeclCXX.h](DeclCXX%5F8h%5Fsource.html)"
#include "[clang/AST/Expr.h](Expr%5F8h%5Fsource.html)"
#include "[clang/AST/StmtCXX.h](StmtCXX%5F8h%5Fsource.html)"
#include "[clang/AST/StmtObjC.h](StmtObjC%5F8h%5Fsource.html)"
#include "[clang/Basic/Builtins.h](Builtins%5F8h%5Fsource.html)"
#include "[clang/Basic/CodeGenOptions.h](CodeGenOptions%5F8h%5Fsource.html)"
#include "[clang/Basic/DiagnosticFrontend.h](DiagnosticFrontend%5F8h%5Fsource.html)"
#include "[clang/Basic/TargetBuiltins.h](TargetBuiltins%5F8h%5Fsource.html)"
#include "[clang/Basic/TargetInfo.h](include%5F2clang%5F2Basic%5F2TargetInfo%5F8h%5Fsource.html)"
#include "[clang/CodeGen/CGFunctionInfo.h](CGFunctionInfo%5F8h%5Fsource.html)"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/ScopeExit.h"
#include "llvm/Frontend/OpenMP/OMPIRBuilder.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Dominators.h"
#include "llvm/IR/FPEnv.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/Support/CRC.h"
#include "llvm/Support/xxhash.h"
#include "llvm/Transforms/Scalar/LowerExpectIntrinsic.h"
#include "llvm/Transforms/Utils/PromoteMemToReg.h"
#include <optional>
#include "clang/AST/TypeNodes.inc"
#include "clang/Basic/Sanitizers.def"

Go to the source code of this file.

Namespaces
namespace llvm
Diagnostic wrappers for TextAPI types for error reporting.
Macros
#define TYPE(name, parent)
#define ABSTRACT_TYPE(name, parent)
#define NON_CANONICAL_TYPE(name, parent)
#define DEPENDENT_TYPE(name, parent)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(name, parent)
#define SANITIZER(NAME, ID)
#define TYPE(Class, Base)
#define ABSTRACT_TYPE(Class, Base)
#define NON_CANONICAL_TYPE(Class, Base)
#define DEPENDENT_TYPE(Class, Base)
#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE(Class, Base)
Functions
static bool shouldEmitLifetimeMarkers (const CodeGenOptions &CGOpts, const LangOptions &LangOpts)
shouldEmitLifetimeMarkers - Decide whether we need emit the life-time markers.
static LValue makeNaturalAlignAddrLValue (llvm::Value *V, QualType T, bool ForPointeeType, bool MightBeSigned, CodeGenFunction &CGF, KnownNonNull_t IsKnownNonNull=NotKnownNonNull)
static void EmitIfUsed (CodeGenFunction &CGF, llvm::BasicBlock *BB)
static bool endsWithReturn (const Decl *F)
Determine whether the function F ends with a return stmt.
static bool matchesStlAllocatorFn (const Decl *D, const ASTContext &Ctx)
static llvm::Constant * getPrologueSignature (CodeGenModule &CGM, const FunctionDecl *FD)
Return the UBSan prologue signature for FD if one is available.
static void TryMarkNoThrow (llvm::Function *F)
Tries to mark the given function nounwind based on the non-existence of any throwing calls within it.
static void emitNonZeroVLAInit (CodeGenFunction &CGF, QualType baseType, Address dest, Address src, llvm::Value *sizeInChars)
emitNonZeroVLAInit - Emit the "zero" initialization of a variable-length array whose elements have a non-zero bit-pattern.
static void CreateMultiVersionResolverReturn (CodeGenModule &CGM, llvm::Function *Resolver, CGBuilderTy &Builder, llvm::Function *FuncToReturn, bool SupportsIFunc)
static llvm::Value * EmitPointerAuthCommon (CodeGenFunction &CGF, const CGPointerAuthInfo &PointerAuth, llvm::Value *Pointer, unsigned IntrinsicID)
static llvm::Value * EmitStrip (CodeGenFunction &CGF, const CGPointerAuthInfo &PointerAuth, llvm::Value *Pointer)

ABSTRACT_TYPE [1/2]

#define ABSTRACT_TYPE ( Class,
Base )

ABSTRACT_TYPE [2/2]

#define ABSTRACT_TYPE ( name,
parent )

DEPENDENT_TYPE [1/2]

#define DEPENDENT_TYPE ( Class,
Base )

DEPENDENT_TYPE [2/2]

#define DEPENDENT_TYPE ( name,
parent )

NON_CANONICAL_TYPE [1/2]

#define NON_CANONICAL_TYPE ( Class,
Base )

NON_CANONICAL_TYPE [2/2]

#define NON_CANONICAL_TYPE ( name,
parent )

NON_CANONICAL_UNLESS_DEPENDENT_TYPE [1/2]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( Class,
Base )

NON_CANONICAL_UNLESS_DEPENDENT_TYPE [2/2]

#define NON_CANONICAL_UNLESS_DEPENDENT_TYPE ( name,
parent )

SANITIZER

#define SANITIZER ( NAME,
ID )

Value:

if (SanOpts.empty()) \

break; \

if (SanOpts.has(SanitizerKind::ID)) \

if (CGM.isInNoSanitizeList(SanitizerKind::ID, Fn, Loc)) \

SanOpts.set(SanitizerKind::ID, false);

TYPE [1/2]

#define TYPE ( Class,
Base )

TYPE [2/2]

#define TYPE ( name,
parent )

CreateMultiVersionResolverReturn()

void CreateMultiVersionResolverReturn ( CodeGenModule & CGM, llvm::Function * Resolver, CGBuilderTy & Builder, llvm::Function * FuncToReturn, bool SupportsIFunc ) static

EmitIfUsed()

emitNonZeroVLAInit()

emitNonZeroVLAInit - Emit the "zero" initialization of a variable-length array whose elements have a non-zero bit-pattern.

Parameters

baseType the inner-most element type of the array
src - a char* pointing to the bit-pattern for a single base element of the array
sizeInChars - the total size of the VLA, in chars

Definition at line 2191 of file CodeGenFunction.cpp.

References clang::CharUnits::alignmentOfArrayElement(), clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::createBasicBlock(), clang::CodeGen::CodeGenFunction::EmitBlock(), clang::CodeGen::Address::emitRawPointer(), clang::CodeGen::Address::getAlignment(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::Address::getElementType(), clang::CharUnits::getQuantity(), clang::CodeGen::Address::getType(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::CodeGenTypeCache::Int8Ty, clang::CodeGen::CodeGenTypeCache::IntPtrTy, and clang::CodeGen::Address::withElementType().

Referenced by clang::CodeGen::CodeGenFunction::EmitNullInitialization().

EmitPointerAuthCommon()

EmitStrip()

endsWithReturn()

bool endsWithReturn ( const Decl * F) static

getPrologueSignature()

makeNaturalAlignAddrLValue()

matchesStlAllocatorFn()

shouldEmitLifetimeMarkers()

TryMarkNoThrow()

void TryMarkNoThrow ( llvm::Function * F) static