#include "CGCXXABI.h"
#include "CGObjCRuntime.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "EHScopeStack.h"
#include "TargetInfo.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
#include "clang/AST/DeclCXX.h"
#include "clang/AST/DeclTemplate.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/Intrinsics.h"
usingnamespaceclang;
usingnamespaceCodeGen;
namespace llvm {
extern cl::opt<bool> EnableSingleByteCoverage;
}
namespace {
class AggExprEmitter : public StmtVisitor<AggExprEmitter> { … };
}
void AggExprEmitter::EmitAggLoadOfLValue(const Expr *E) { … }
bool AggExprEmitter::TypeRequiresGCollection(QualType T) { … }
void AggExprEmitter::withReturnValueSlot(
const Expr *E, llvm::function_ref<RValue(ReturnValueSlot)> EmitCall) { … }
void AggExprEmitter::EmitFinalDestCopy(QualType type, RValue src) { … }
void AggExprEmitter::EmitFinalDestCopy(
QualType type, const LValue &src,
CodeGenFunction::ExprValueKind SrcValueKind) { … }
void AggExprEmitter::EmitCopy(QualType type, const AggValueSlot &dest,
const AggValueSlot &src) { … }
void
AggExprEmitter::VisitCXXStdInitializerListExpr(CXXStdInitializerListExpr *E) { … }
static bool isTrivialFiller(Expr *E) { … }
void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType,
QualType ArrayQTy, Expr *ExprToVisit,
ArrayRef<Expr *> Args, Expr *ArrayFiller) { … }
void AggExprEmitter::VisitMaterializeTemporaryExpr(MaterializeTemporaryExpr *E){ … }
void AggExprEmitter::VisitOpaqueValueExpr(OpaqueValueExpr *e) { … }
void
AggExprEmitter::VisitCompoundLiteralExpr(CompoundLiteralExpr *E) { … }
static Expr *findPeephole(Expr *op, CastKind kind, const ASTContext &ctx) { … }
void AggExprEmitter::VisitCastExpr(CastExpr *E) { … }
void AggExprEmitter::VisitCallExpr(const CallExpr *E) { … }
void AggExprEmitter::VisitObjCMessageExpr(ObjCMessageExpr *E) { … }
void AggExprEmitter::VisitBinComma(const BinaryOperator *E) { … }
void AggExprEmitter::VisitStmtExpr(const StmtExpr *E) { … }
enum CompareKind { … };
static llvm::Value *EmitCompare(CGBuilderTy &Builder, CodeGenFunction &CGF,
const BinaryOperator *E, llvm::Value *LHS,
llvm::Value *RHS, CompareKind Kind,
const char *NameSuffix = "") { … }
void AggExprEmitter::VisitBinCmp(const BinaryOperator *E) { … }
void AggExprEmitter::VisitBinaryOperator(const BinaryOperator *E) { … }
void AggExprEmitter::VisitPointerToDataMemberBinaryOperator(
const BinaryOperator *E) { … }
static bool isBlockVarRef(const Expr *E) { … }
void AggExprEmitter::VisitBinAssign(const BinaryOperator *E) { … }
void AggExprEmitter::
VisitAbstractConditionalOperator(const AbstractConditionalOperator *E) { … }
void AggExprEmitter::VisitChooseExpr(const ChooseExpr *CE) { … }
void AggExprEmitter::VisitVAArgExpr(VAArgExpr *VE) { … }
void AggExprEmitter::VisitCXXBindTemporaryExpr(CXXBindTemporaryExpr *E) { … }
void
AggExprEmitter::VisitCXXConstructExpr(const CXXConstructExpr *E) { … }
void AggExprEmitter::VisitCXXInheritedCtorInitExpr(
const CXXInheritedCtorInitExpr *E) { … }
void
AggExprEmitter::VisitLambdaExpr(LambdaExpr *E) { … }
void AggExprEmitter::VisitExprWithCleanups(ExprWithCleanups *E) { … }
void AggExprEmitter::VisitCXXScalarValueInitExpr(CXXScalarValueInitExpr *E) { … }
void AggExprEmitter::VisitImplicitValueInitExpr(ImplicitValueInitExpr *E) { … }
static bool castPreservesZero(const CastExpr *CE) { … }
static bool isSimpleZero(const Expr *E, CodeGenFunction &CGF) { … }
void
AggExprEmitter::EmitInitializationToLValue(Expr *E, LValue LV) { … }
void AggExprEmitter::EmitNullInitializationToLValue(LValue lv) { … }
void AggExprEmitter::VisitCXXParenListInitExpr(CXXParenListInitExpr *E) { … }
void AggExprEmitter::VisitInitListExpr(InitListExpr *E) { … }
void AggExprEmitter::VisitCXXParenListOrInitListExpr(
Expr *ExprToVisit, ArrayRef<Expr *> InitExprs,
FieldDecl *InitializedFieldInUnion, Expr *ArrayFiller) { … }
void AggExprEmitter::VisitArrayInitLoopExpr(const ArrayInitLoopExpr *E,
llvm::Value *outerBegin) { … }
void AggExprEmitter::VisitDesignatedInitUpdateExpr(DesignatedInitUpdateExpr *E) { … }
static CharUnits GetNumNonZeroBytesInInit(const Expr *E, CodeGenFunction &CGF) { … }
static void CheckAggExprForMemSetUse(AggValueSlot &Slot, const Expr *E,
CodeGenFunction &CGF) { … }
void CodeGenFunction::EmitAggExpr(const Expr *E, AggValueSlot Slot) { … }
LValue CodeGenFunction::EmitAggExprToLValue(const Expr *E) { … }
void CodeGenFunction::EmitAggFinalDestCopy(QualType Type, AggValueSlot Dest,
const LValue &Src,
ExprValueKind SrcKind) { … }
AggValueSlot::Overlap_t
CodeGenFunction::getOverlapForFieldInit(const FieldDecl *FD) { … }
AggValueSlot::Overlap_t CodeGenFunction::getOverlapForBaseInit(
const CXXRecordDecl *RD, const CXXRecordDecl *BaseRD, bool IsVirtual) { … }
void CodeGenFunction::EmitAggregateCopy(LValue Dest, LValue Src, QualType Ty,
AggValueSlot::Overlap_t MayOverlap,
bool isVolatile) { … }