Changeset View
Changeset View
Standalone View
Standalone View
clang/lib/CodeGen/CGExprScalar.cpp
Show First 20 Lines • Show All 288 Lines • ▼ Show 20 Lines | if (!AVAttr) | ||||
dyn_cast<TypedefType>(E->getType())) | dyn_cast<TypedefType>(E->getType())) | ||||
AVAttr = TTy->getDecl()->getAttr<AlignValueAttr>(); | AVAttr = TTy->getDecl()->getAttr<AlignValueAttr>(); | ||||
if (!AVAttr) | if (!AVAttr) | ||||
return; | return; | ||||
Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment()); | Value *AlignmentValue = CGF.EmitScalarExpr(AVAttr->getAlignment()); | ||||
llvm::ConstantInt *AlignmentCI = cast<llvm::ConstantInt>(AlignmentValue); | llvm::ConstantInt *AlignmentCI = cast<llvm::ConstantInt>(AlignmentValue); | ||||
CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), | CGF.EmitAlignmentAssumption(V, E, AVAttr->getLocation(), AlignmentCI); | ||||
AlignmentCI->getZExtValue()); | |||||
} | } | ||||
/// EmitLoadOfLValue - Given an expression with complex type that represents a | /// EmitLoadOfLValue - Given an expression with complex type that represents a | ||||
/// value l-value, this method emits the address of the l-value, then loads | /// value l-value, this method emits the address of the l-value, then loads | ||||
/// and returns the result. | /// and returns the result. | ||||
Value *EmitLoadOfLValue(const Expr *E) { | Value *EmitLoadOfLValue(const Expr *E) { | ||||
Value *V = EmitLoadOfLValue(EmitCheckedLValue(E, CodeGenFunction::TCK_Load), | Value *V = EmitLoadOfLValue(EmitCheckedLValue(E, CodeGenFunction::TCK_Load), | ||||
E->getExprLoc()); | E->getExprLoc()); | ||||
▲ Show 20 Lines • Show All 4,451 Lines • Show Last 20 Lines |