}
LValue CodeGenFunction::EmitMemberExpr(const MemberExpr *E) {
- llvm::Value *V;
bool isUnion = false;
Expr *BaseExpr = E->getBase();
llvm::Value *BaseValue = NULL;
}
FieldDecl *Field = E->getMemberDecl();
- unsigned idx = CGM.getTypes().getLLVMFieldNo(Field);
+ return EmitLValueForField(BaseValue, Field, isUnion);
+}
+LValue CodeGenFunction::EmitLValueForField(llvm::Value* BaseValue,
+ FieldDecl* Field,
+ bool isUnion)
+{
+ llvm::Value *V;
+ unsigned idx = CGM.getTypes().getLLVMFieldNo(Field);
if (Field->isBitField()) {
const llvm::Type * FieldTy = ConvertType(Field->getType());
for (unsigned i = 0, e = NumArgs; i != e; ++i) {
QualType ArgTy = ArgExprs[i]->getType();
-
+
if (!hasAggregateLLVMType(ArgTy)) {
// Scalar argument is passed by-value.
Args.push_back(EmitScalarExpr(ArgExprs[i]));
class BlockVarDecl;
class EnumConstantDecl;
class ParmVarDecl;
+ class FieldDecl;
namespace CodeGen {
class CodeGenModule;
class CodeGenTypes;
LValue EmitArraySubscriptExpr(const ArraySubscriptExpr *E);
LValue EmitOCUVectorElementExpr(const OCUVectorElementExpr *E);
LValue EmitMemberExpr(const MemberExpr *E);
+
+ LValue EmitLValueForField(llvm::Value* Base, FieldDecl* Field,
+ bool isUnion);
//===--------------------------------------------------------------------===//
// Scalar Expression Emission