clang
15.0.0git
|
#include "CGCUDARuntime.h"
#include "CGCXXABI.h"
#include "CGCall.h"
#include "CGCleanup.h"
#include "CGDebugInfo.h"
#include "CGObjCRuntime.h"
#include "CGOpenMPRuntime.h"
#include "CGRecordLayout.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclObjC.h"
#include "clang/AST/NSAPI.h"
#include "clang/Basic/Builtins.h"
#include "clang/Basic/CodeGenOptions.h"
#include "clang/Basic/SourceManager.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/IR/DataLayout.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/MatrixBuilder.h"
#include "llvm/Support/ConvertUTF.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Path.h"
#include "llvm/Support/SaveAndRestore.h"
#include "llvm/Transforms/Utils/SanitizerStats.h"
#include <string>
Go to the source code of this file.
Macros | |
#define | SANITIZER_CHECK(Enum, Name, Version) {#Name, Version}, |
Enumerations | |
enum | ConstantEmissionKind { CEK_None, CEK_AsReferenceOnly, CEK_AsValueOrReference, CEK_AsValueOnly } |
Can we constant-emit a load of a reference to a variable of the given type? This is different from predicates like Decl::mightBeUsableInConstantExpressions because we do want it to apply in situations that don't necessarily satisfy the language's rules for this (e.g. More... | |
Functions | |
static void | pushTemporaryCleanup (CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, const Expr *E, Address ReferenceTemporary) |
static Address | createReferenceTemporary (CodeGenFunction &CGF, const MaterializeTemporaryExpr *M, const Expr *Inner, Address *Alloca=nullptr) |
static bool | isAAPCS (const TargetInfo &TargetInfo) |
Helper method to check if the underlying ABI is AAPCS. More... | |
static llvm::Value * | emitHash16Bytes (CGBuilderTy &Builder, llvm::Value *Low, llvm::Value *High) |
Emit the hash_16_bytes function from include/llvm/ADT/Hashing.h. More... | |
static bool | isFlexibleArrayMemberExpr (const Expr *E) |
Determine whether this expression refers to a flexible array member in a struct. More... | |
static llvm::Value * | getArrayIndexingBound (CodeGenFunction &CGF, const Expr *Base, QualType &IndexedType) |
If Base is known to point to the start of an array, return the length of that array. More... | |
static bool | isConstantEmittableObjectType (QualType type) |
Given an object of the given canonical type, can we safely copy a value out of it based on its initializer? More... | |
static ConstantEmissionKind | checkVarTypeForConstantEmission (QualType type) |
static DeclRefExpr * | tryToConvertMemberExprToDeclRefExpr (CodeGenFunction &CGF, const MemberExpr *ME) |
static bool | hasBooleanRepresentation (QualType Ty) |
static bool | getRangeForType (CodeGenFunction &CGF, QualType Ty, llvm::APInt &Min, llvm::APInt &End, bool StrictEnums, bool IsBool) |
static Address | MaybeConvertMatrixAddress (Address Addr, CodeGenFunction &CGF, bool IsVector=true) |
static void | EmitStoreOfMatrixScalar (llvm::Value *value, LValue lvalue, bool isInit, CodeGenFunction &CGF) |
static RValue | EmitLoadOfMatrixLValue (LValue LV, SourceLocation Loc, CodeGenFunction &CGF) |
static void | setObjCGCLValueClass (const ASTContext &Ctx, const Expr *E, LValue &LV, bool IsMemberAccess=false) |
static llvm::Value * | EmitBitCastOfLValueToProperType (CodeGenFunction &CGF, llvm::Value *V, llvm::Type *IRType, StringRef Name=StringRef()) |
static LValue | EmitThreadPrivateVarDeclLValue (CodeGenFunction &CGF, const VarDecl *VD, QualType T, Address Addr, llvm::Type *RealVarTy, SourceLocation Loc) |
static Address | emitDeclTargetVarDeclLValue (CodeGenFunction &CGF, const VarDecl *VD, QualType T) |
static LValue | EmitGlobalVarDeclLValue (CodeGenFunction &CGF, const Expr *E, const VarDecl *VD) |
static llvm::Constant * | EmitFunctionDeclPointer (CodeGenModule &CGM, GlobalDecl GD) |
static LValue | EmitFunctionDeclLValue (CodeGenFunction &CGF, const Expr *E, GlobalDecl GD) |
static LValue | EmitCapturedFieldLValue (CodeGenFunction &CGF, const FieldDecl *FD, llvm::Value *ThisValue) |
static LValue | EmitGlobalNamedRegister (const VarDecl *VD, CodeGenModule &CGM) |
Named Registers are named metadata pointing to the register name which will be read from/written to as an argument to the intrinsic @llvm.read/write_register. More... | |
static bool | canEmitSpuriousReferenceToVariable (CodeGenFunction &CGF, const DeclRefExpr *E, const VarDecl *VD, bool IsConstant) |
Determine whether we can emit a reference to VD from the current context, despite not necessarily having seen an odr-use of the variable in this context. More... | |
static CheckRecoverableKind | getRecoverableKind (SanitizerMask Kind) |
static void | emitCheckHandlerCall (CodeGenFunction &CGF, llvm::FunctionType *FnType, ArrayRef< llvm::Value * > FnArgs, SanitizerHandler CheckHandler, CheckRecoverableKind RecoverKind, bool IsFatal, llvm::BasicBlock *ContBB) |
static const Expr * | isSimpleArrayDecayOperand (const Expr *E) |
isSimpleArrayDecayOperand - If the specified expr is a simple decay from an array to pointer, return the array subexpression. More... | |
static llvm::Value * | emitArraySubscriptGEP (CodeGenFunction &CGF, llvm::Type *elemType, llvm::Value *ptr, ArrayRef< llvm::Value * > indices, bool inbounds, bool signedIndices, SourceLocation loc, const llvm::Twine &name="arrayidx") |
static CharUnits | getArrayElementAlign (CharUnits arrayAlign, llvm::Value *idx, CharUnits eltSize) |
static QualType | getFixedSizeElementType (const ASTContext &ctx, const VariableArrayType *vla) |
static bool | IsPreserveAIArrayBase (CodeGenFunction &CGF, const Expr *ArrayBase) |
Given an array base, check whether its member access belongs to a record with preserve_access_index attribute or not. More... | |
static Address | emitArraySubscriptGEP (CodeGenFunction &CGF, Address addr, ArrayRef< llvm::Value * > indices, QualType eltType, bool inbounds, bool signedIndices, SourceLocation loc, QualType *arrayType=nullptr, const Expr *Base=nullptr, const llvm::Twine &name="arrayidx") |
static Address | emitOMPArraySectionBase (CodeGenFunction &CGF, const Expr *Base, LValueBaseInfo &BaseInfo, TBAAAccessInfo &TBAAInfo, QualType BaseTy, QualType ElTy, bool IsLowerBound) |
static Address | emitAddrOfZeroSizeField (CodeGenFunction &CGF, Address Base, const FieldDecl *Field) |
Get the address of a zero-sized field within a record. More... | |
static Address | emitAddrOfFieldStorage (CodeGenFunction &CGF, Address base, const FieldDecl *field) |
Drill down to the storage of a field without walking into reference types. More... | |
static Address | emitPreserveStructAccess (CodeGenFunction &CGF, LValue base, Address addr, const FieldDecl *field) |
static bool | hasAnyVptr (const QualType Type, const ASTContext &Context) |
static Optional< LValue > | EmitLValueOrThrowExpression (CodeGenFunction &CGF, const Expr *Operand) |
Emit the operand of a glvalue conditional operator. More... | |
static bool | OnlyHasInlineBuiltinDeclaration (const FunctionDecl *FD) |
static CGCallee | EmitDirectCallee (CodeGenFunction &CGF, GlobalDecl GD) |
static LValueOrRValue | emitPseudoObjectExpr (CodeGenFunction &CGF, const PseudoObjectExpr *E, bool forLValue, AggValueSlot slot) |
Variables | |
const SanitizerHandlerInfo | SanitizerHandlers [] |
#define SANITIZER_CHECK | ( | Enum, | |
Name, | |||
Version | |||
) | {#Name, Version}, |
enum ConstantEmissionKind |
Can we constant-emit a load of a reference to a variable of the given type? This is different from predicates like Decl::mightBeUsableInConstantExpressions because we do want it to apply in situations that don't necessarily satisfy the language's rules for this (e.g.
C++'s ODR-use rules). For example, we want to able to do this with const float variables even if those variables aren't marked 'constexpr'.
Enumerator | |
---|---|
CEK_None | |
CEK_AsReferenceOnly | |
CEK_AsValueOrReference | |
CEK_AsValueOnly |
Definition at line 1481 of file CGExpr.cpp.
|
static |
Determine whether we can emit a reference to VD
from the current context, despite not necessarily having seen an odr-use of the variable in this context.
Definition at line 2698 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::CurCodeDecl, clang::ExternalLinkage, clang::CodeGen::CodeGenFunction::getContext(), clang::Decl::getDeclContext(), clang::VarDecl::getDefinition(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::CodeGen::CodeGenModule::getLLVMLinkageVarDefinition(), clang::VarDecl::hasLocalStorage(), clang::InternalLinkage, and clang::DeclRefExpr::refersToEnclosingVariableOrCapture().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue().
|
static |
Definition at line 1487 of file CGExpr.cpp.
References CEK_AsReferenceOnly, CEK_AsValueOnly, CEK_AsValueOrReference, CEK_None, and isConstantEmittableObjectType().
Referenced by clang::CodeGen::CodeGenFunction::tryEmitAsConstant().
|
static |
Definition at line 388 of file CGExpr.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr().
|
static |
Drill down to the storage of a field without walking into reference types.
The resulting address doesn't necessarily have the right type.
Definition at line 4312 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateStructGEP(), emitAddrOfZeroSizeField(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::NamedDecl::getName(), clang::FieldDecl::getParent(), clang::CodeGen::CodeGenModule::getTypes(), and clang::FieldDecl::isZeroSize().
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField(), and clang::CodeGen::CodeGenFunction::EmitLValueForFieldInitialization().
|
static |
Get the address of a zero-sized field within a record.
The resulting address doesn't necessarily have the right type.
Definition at line 4298 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::getContext(), clang::ASTContext::getFieldOffset(), Offset, and clang::ASTContext::toCharUnitsFromBits().
Referenced by emitAddrOfFieldStorage().
|
static |
Definition at line 3739 of file CGExpr.cpp.
References clang::ast_matchers::arrayType, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), emitArraySubscriptGEP(), clang::CodeGen::Address::getAlignment(), getArrayElementAlign(), clang::ASTContext::getAsVariableArrayType(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenFunction::getDebugInfo(), clang::CodeGen::Address::getElementType(), getFixedSizeElementType(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::CodeGen::Address::getPointer(), clang::ASTContext::getTypeSizeInChars(), clang::CodeGen::CodeGenFunction::IsInPreservedAIRegion, IsPreserveAIArrayBase(), and clang::transformer::name().
|
static |
Definition at line 3662 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateGEP(), clang::CodeGen::CodeGenFunction::EmitCheckedInBoundsGEP(), clang::transformer::name(), and clang::CodeGen::CodeGenFunction::NotSubtraction.
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), emitArraySubscriptGEP(), and clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr().
|
static |
Definition at line 2507 of file CGExpr.cpp.
Referenced by EmitGlobalVarDeclLValue().
|
static |
Definition at line 2660 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::EmitLValueForField(), clang::CodeGen::CodeGenFunction::getContext(), clang::FieldDecl::getParent(), clang::ASTContext::getTagDeclType(), and clang::CodeGen::CodeGenFunction::MakeNaturalAlignAddrLValue().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue().
|
static |
Definition at line 3230 of file CGExpr.cpp.
References AlwaysRecoverable, clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenModule::CreateRuntimeFunction(), clang::CodeGen::CodeGenFunction::EmitNounwindRuntimeCall(), clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenFunction::getLLVMContext(), SanitizerHandlers, string(), and Unrecoverable.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheck().
|
static |
Definition at line 2528 of file CGExpr.cpp.
References clang::Type::castAs(), clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::EmitLoadOfPointer(), clang::CodeGen::CGOpenMPRuntime::getAddrOfDeclareTargetVar(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::CodeGen::CGOpenMPRuntime::hasRequiresUnifiedSharedMemory(), and clang::CodeGen::Address::invalid().
Referenced by EmitGlobalVarDeclLValue().
|
static |
Definition at line 5033 of file CGExpr.cpp.
References clang::ASTContext::BuiltinInfo, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::CurFn, EmitFunctionDeclPointer(), clang::CodeGen::CGCallee::forBuiltin(), clang::CodeGen::CGCallee::forDirect(), clang::FunctionDecl::getBuiltinID(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getCUDARuntime(), clang::GlobalDecl::getDecl(), clang::CodeGen::CGCUDARuntime::getKernelStub(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::NamedDecl::getName(), clang::Decl::hasAttr(), clang::InternalLinkage, clang::Builtin::Context::isPredefinedLibFunction(), OnlyHasInlineBuiltinDeclaration(), and string().
Referenced by clang::CodeGen::CodeGenFunction::EmitCallee().
|
static |
Definition at line 2651 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::Decl, EmitFunctionDeclPointer(), clang::CodeGen::CodeGenFunction::getContext(), clang::GlobalDecl::getDecl(), clang::ASTContext::getDeclAlign(), clang::Expr::getType(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), and V.
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), and clang::CodeGen::CodeGenFunction::EmitMemberExpr().
|
static |
Definition at line 2626 of file CGExpr.cpp.
References clang::CodeGen::CodeGenTypes::ConvertType(), clang::CodeGen::CodeGenModule::GetAddrOfFunction(), clang::Type::getAs(), clang::CodeGen::CodeGenModule::getContext(), clang::GlobalDecl::getDecl(), clang::ASTContext::getFunctionNoProtoType(), clang::CodeGen::ConstantAddress::getPointer(), clang::ASTContext::getPointerType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenModule::getTypes(), clang::CodeGen::CodeGenModule::GetWeakRefReference(), clang::Decl::hasAttr(), clang::FunctionDecl::hasPrototype(), and V.
Referenced by EmitDirectCallee(), and EmitFunctionDeclLValue().
|
static |
Named Registers are named metadata pointing to the register name which will be read from/written to as an argument to the intrinsic @llvm.read/write_register.
So far, only the name is being passed down, but other options such as register type, allocation type or even optimization options could be passed down via the metadata node.
Definition at line 2673 of file CGExpr.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue().
|
static |
Definition at line 2590 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenTypes::ConvertTypeForMem(), clang::CodeGen::Decl, EmitBitCastOfLValueToProperType(), emitDeclTargetVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitLoadOfReferenceLValue(), clang::CodeGen::CGCXXABI::EmitThreadLocalVarDeclLValue(), EmitThreadPrivateVarDeclLValue(), clang::CodeGen::CodeGenModule::GetAddrOfGlobalVar(), clang::CodeGen::CodeGenFunction::getContext(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::ASTContext::getDeclAlign(), clang::Expr::getExprLoc(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::VarDecl::getTLSKind(), clang::Expr::getType(), clang::ValueDecl::getType(), clang::CodeGen::CodeGenFunction::getTypes(), clang::Decl::hasAttr(), clang::Type::isReferenceType(), clang::CodeGen::Address::isValid(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), setObjCGCLValueClass(), clang::VarDecl::TLS_Dynamic, clang::CodeGen::CGCXXABI::usesThreadWrapperFunction(), and V.
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue().
|
static |
Emit the hash_16_bytes function from include/llvm/ADT/Hashing.h.
Definition at line 644 of file CGExpr.cpp.
|
static |
Definition at line 1937 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(), clang::CodeGen::RValue::get(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getType(), clang::Type::isConstantMatrixType(), MaybeConvertMatrixAddress(), and clang::CodeGen::LValue::setAddress().
Referenced by clang::CodeGen::CodeGenFunction::EmitLoadOfLValue().
|
static |
Emit the operand of a glvalue conditional operator.
This is either a glvalue or a (possibly-parenthesized) throw-expression. If this is a throw, no LValue is returned and the current block has been terminated.
Definition at line 4589 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::EmitCXXThrowExpr(), and clang::CodeGen::CodeGenFunction::EmitLValue().
Referenced by clang::CodeGen::CodeGenFunction::EmitConditionalOperatorLValue().
|
static |
Definition at line 3963 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CodeGenFunction::ConvertType(), clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), clang::CodeGen::CGBuilderTy::CreateConstArrayGEP(), clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::CGBuilderTy::CreateLoad(), clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr(), clang::CodeGen::CodeGenFunction::EmitPointerWithAlignment(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::Address::getElementType(), clang::CodeGen::CodeGenModule::getNaturalTypeAlignment(), clang::Type::isArrayType(), clang::Type::isVariableArrayType(), clang::CodeGen::LValueBaseInfo::mergeForCast(), and clang::CodeGen::CodeGenModule::mergeTBAAInfoForCast().
Referenced by clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr().
|
static |
Definition at line 4325 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreatePreserveStructAccessIndex(), clang::CodeGen::CodeGenTypes::getCGRecordLayout(), clang::CodeGen::CodeGenFunction::getDebugInfo(), clang::CodeGen::CodeGenFunction::getDebugInfoFIndex(), clang::FieldDecl::getFieldIndex(), clang::CodeGen::CGRecordLayout::getLLVMFieldNo(), clang::Decl::getLocation(), clang::CodeGen::CGDebugInfo::getOrCreateStandaloneType(), clang::FieldDecl::getParent(), clang::CodeGen::LValue::getType(), and clang::CodeGen::CodeGenModule::getTypes().
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField().
|
static |
Definition at line 5562 of file CGExpr.cpp.
References clang::CodeGen::AggValueSlot::asRValue(), clang::PseudoObjectExpr::const_semantics_iterator, clang::CodeGen::Decl, clang::CodeGen::CodeGenFunction::EmitAggExpr(), clang::CodeGen::CodeGenFunction::EmitAnyExpr(), clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(), clang::CodeGen::CodeGenFunction::EmitLValue(), clang::CodeGen::AggValueSlot::getAddress(), clang::PseudoObjectExpr::getResultExpr(), clang::CodeGen::Address::getType(), clang::CodeGen::CodeGenFunction::hasAggregateEvaluationKind(), clang::Expr::isPRValue(), clang::CodeGen::CodeGenFunction::MakeAddrLValue(), clang::PseudoObjectExpr::semantics_begin(), and clang::PseudoObjectExpr::semantics_end().
Referenced by clang::CodeGen::CodeGenFunction::EmitPseudoObjectLValue(), and clang::CodeGen::CodeGenFunction::EmitPseudoObjectRValue().
|
static |
Definition at line 1863 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::EmitStoreOfScalar(), clang::CodeGen::LValue::getAddress(), clang::CodeGen::LValue::getBaseInfo(), clang::CodeGen::LValue::getTBAAInfo(), clang::CodeGen::LValue::getType(), clang::CodeGen::LValue::isNontemporal(), clang::CodeGen::LValue::isVolatile(), and MaybeConvertMatrixAddress().
Referenced by clang::CodeGen::CodeGenFunction::EmitStoreOfScalar().
|
static |
Definition at line 2514 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CodeGenFunction::CGM, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), clang::CodeGen::Decl, clang::CodeGen::CGOpenMPRuntime::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenFunction::OMPBuilderCBHelpers::getAddrOfThreadPrivate(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getOpenMPRuntime(), and clang::CodeGen::CodeGenFunction::MakeAddrLValue().
Referenced by clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), and EmitGlobalVarDeclLValue().
|
static |
Definition at line 3679 of file CGExpr.cpp.
References clang::CharUnits::alignmentAtOffset(), and clang::CharUnits::alignmentOfArrayElement().
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), and emitArraySubscriptGEP().
|
static |
If Base is known to point to the start of an array, return the length of that array.
Return 0 if the length cannot be determined.
Definition at line 960 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::Type::castAsArrayTypeUnsafe(), clang::CodeGen::CodeGenFunction::getVLASize(), isFlexibleArrayMemberExpr(), clang::CodeGen::CodeGenFunction::LoadPassedObjectSize(), and clang::CodeGen::CodeGenFunction::VlaSizePair::NumElts.
|
static |
Definition at line 3694 of file CGExpr.cpp.
References clang::ASTContext::getAsVariableArrayType(), and clang::ArrayType::getElementType().
Referenced by emitArraySubscriptGEP().
|
static |
Definition at line 1640 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::ConvertTypeForMem(), End, clang::Type::getAs(), clang::CodeGen::CodeGenFunction::getContext(), clang::EnumType::getDecl(), clang::EnumDecl::getIntegerType(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::EnumDecl::getNumNegativeBits(), clang::EnumDecl::getNumPositiveBits(), clang::ASTContext::getTypeSize(), clang::EnumDecl::isFixed(), and max().
Referenced by clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck().
|
static |
Definition at line 3207 of file CGExpr.cpp.
References AlwaysRecoverable, and Unrecoverable.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheck().
|
static |
Definition at line 4338 of file CGExpr.cpp.
References clang::Type::getAsCXXRecordDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitLValueForField().
Definition at line 1627 of file CGExpr.cpp.
References clang::Type::getAs(), and clang::Type::isBooleanType().
Referenced by clang::CodeGen::CodeGenFunction::EmitFromMemory(), clang::CodeGen::CodeGenFunction::EmitScalarRangeCheck(), clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue(), and clang::CodeGen::CodeGenFunction::EmitToMemory().
|
static |
Helper method to check if the underlying ABI is AAPCS.
Definition at line 435 of file CGExpr.cpp.
References clang::TargetInfo::getABI().
Referenced by clang::CodeGen::CodeGenFunction::EmitLoadOfBitfieldLValue(), clang::CodeGen::CodeGenFunction::EmitLValueForField(), and clang::CodeGen::CodeGenFunction::EmitStoreThroughBitfieldLValue().
Given an object of the given canonical type, can we safely copy a value out of it based on its initializer?
Definition at line 1456 of file CGExpr.cpp.
References clang::Qualifiers::hasConst(), and clang::Qualifiers::hasVolatile().
Referenced by checkVarTypeForConstantEmission().
Determine whether this expression refers to a flexible array member in a struct.
We disable array bounds checks for such members.
Definition at line 883 of file CGExpr.cpp.
References clang::Type::castAsArrayTypeUnsafe(), clang::Expr::getType(), and clang::Expr::IgnoreParens().
Referenced by getArrayIndexingBound().
|
static |
Given an array base, check whether its member access belongs to a record with preserve_access_index attribute or not.
Definition at line 3705 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::getDebugInfo(), clang::PointerType::getPointeeType(), clang::Type::getUnqualifiedDesugaredType(), clang::Type::hasAttr(), and clang::Expr::IgnoreImpCasts().
Referenced by emitArraySubscriptGEP().
isSimpleArrayDecayOperand - If the specified expr is a simple decay from an array to pointer, return the array subexpression.
Definition at line 3648 of file CGExpr.cpp.
References clang::Expr::getType(), and clang::Type::isVariableArrayType().
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), and clang::CodeGen::CodeGenFunction::EmitOMPArraySectionExpr().
|
static |
Definition at line 1839 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::Builder, clang::CodeGen::CGBuilderTy::CreateElementBitCast(), and clang::CodeGen::Address::getElementType().
Referenced by EmitLoadOfMatrixLValue(), clang::CodeGen::CodeGenFunction::EmitMatrixSubscriptExpr(), and EmitStoreOfMatrixScalar().
|
static |
Definition at line 5026 of file CGExpr.cpp.
References clang::Redeclarable< decl_type >::getPreviousDecl().
Referenced by EmitDirectCallee().
|
static |
Definition at line 272 of file CGExpr.cpp.
References clang::CodeGen::CodeGenFunction::CGM, clang::interp::Destroy(), clang::CodeGen::CodeGenFunction::destroyARCStrongImprecise, clang::CodeGen::CodeGenFunction::destroyARCStrongPrecise, clang::CodeGen::CodeGenFunction::destroyARCWeak, clang::CodeGen::CodeGenFunction::destroyCXXObject, clang::Dtor_Complete, clang::CodeGen::EHCleanup, clang::CodeGen::CodeGenFunction::generateDestroyHelper(), clang::CodeGen::CodeGenModule::getAddrAndTypeOfCXXStructor(), clang::CodeGen::CodeGenFunction::getARCCleanupKind(), clang::Type::getAs(), clang::Type::getBaseElementTypeUnsafe(), clang::CodeGen::CodeGenModule::getCXXABI(), clang::MaterializeTemporaryExpr::getExtendingDecl(), clang::CodeGen::CodeGenFunction::getLangOpts(), clang::QualType::getObjCLifetime(), clang::CodeGen::Address::getPointer(), clang::MaterializeTemporaryExpr::getStorageDuration(), clang::Expr::getType(), clang::Decl::hasAttr(), clang::CodeGen::CodeGenTypeCache::Int8PtrTy, clang::Type::isArrayType(), clang::CodeGen::NormalAndEHCleanup, clang::Qualifiers::OCL_Autoreleasing, clang::Qualifiers::OCL_ExplicitNone, clang::Qualifiers::OCL_None, clang::Qualifiers::OCL_Strong, clang::Qualifiers::OCL_Weak, clang::CodeGen::CodeGenFunction::pushDestroy(), clang::CodeGen::CodeGenFunction::pushLifetimeExtendedDestroy(), clang::CodeGen::CGCXXABI::registerGlobalDtor(), clang::SD_Automatic, clang::SD_Dynamic, clang::SD_FullExpression, clang::SD_Static, and clang::SD_Thread.
Referenced by clang::CodeGen::CodeGenFunction::EmitMaterializeTemporaryExpr().
|
static |
Definition at line 2409 of file CGExpr.cpp.
References clang::Type::castAs(), clang::ASTContext::getLangOpts(), clang::Expr::getType(), clang::Type::isArrayType(), clang::CodeGen::LValue::isGlobalObjCRef(), clang::CodeGen::LValue::isObjCArray(), clang::CodeGen::LValue::isObjCIvar(), clang::Type::isPointerType(), clang::Type::isRecordType(), clang::LangOptions::NonGC, clang::CodeGen::LValue::setBaseIvarExp(), clang::CodeGen::LValue::setGlobalObjCRef(), clang::CodeGen::LValue::setObjCArray(), clang::CodeGen::LValue::setObjCIvar(), clang::CodeGen::LValue::setThreadLocalRef(), and clang::VarDecl::TLS_None.
Referenced by clang::CodeGen::CodeGenFunction::EmitArraySubscriptExpr(), clang::CodeGen::CodeGenFunction::EmitDeclRefLValue(), EmitGlobalVarDeclLValue(), clang::CodeGen::CodeGenFunction::EmitMemberExpr(), and clang::CodeGen::CodeGenFunction::EmitObjCIvarRefLValue().
|
static |
Definition at line 1591 of file CGExpr.cpp.
References clang::DeclRefExpr::Create(), clang::CodeGen::CodeGenFunction::getContext(), clang::MemberExpr::getExprLoc(), clang::MemberExpr::getMemberDecl(), clang::Expr::getType(), clang::Expr::getValueKind(), and clang::MemberExpr::isNonOdrUse().
Referenced by clang::CodeGen::CodeGenFunction::EmitMemberExpr(), and clang::CodeGen::CodeGenFunction::tryEmitAsConstant().
const SanitizerHandlerInfo SanitizerHandlers[] |
Definition at line 3224 of file CGExpr.cpp.
Referenced by clang::CodeGen::CodeGenFunction::EmitCheck(), and emitCheckHandlerCall().