Deleted Added
full compact
CGExprAgg.cpp (193326) CGExprAgg.cpp (193401)
1//===--- CGExprAgg.cpp - Emit LLVM Code from Aggregate Expressions --------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 152 unchanged lines hidden (view full) ---

161}
162
163//===----------------------------------------------------------------------===//
164// Visitor Methods
165//===----------------------------------------------------------------------===//
166
167void AggExprEmitter::VisitCStyleCastExpr(CStyleCastExpr *E) {
168 // GCC union extension
1//===--- CGExprAgg.cpp - Emit LLVM Code from Aggregate Expressions --------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 152 unchanged lines hidden (view full) ---

161}
162
163//===----------------------------------------------------------------------===//
164// Visitor Methods
165//===----------------------------------------------------------------------===//
166
167void AggExprEmitter::VisitCStyleCastExpr(CStyleCastExpr *E) {
168 // GCC union extension
169 if (E->getType()->isUnionType()) {
170 RecordDecl *SD = E->getType()->getAsRecordType()->getDecl();
171 LValue FieldLoc = CGF.EmitLValueForField(DestPtr,
172 *SD->field_begin(CGF.getContext()),
173 true, 0);
174 EmitInitializationToLValue(E->getSubExpr(), FieldLoc);
169 if (E->getSubExpr()->getType()->isScalarType()) {
170 QualType PtrTy =
171 CGF.getContext().getPointerType(E->getSubExpr()->getType());
172 llvm::Value *CastPtr = Builder.CreateBitCast(DestPtr,
173 CGF.ConvertType(PtrTy));
174 EmitInitializationToLValue(E->getSubExpr(), LValue::MakeAddr(CastPtr, 0));
175 return;
176 }
177
178 Visit(E->getSubExpr());
179}
180
181void AggExprEmitter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
182 assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(),

--- 372 unchanged lines hidden ---
175 return;
176 }
177
178 Visit(E->getSubExpr());
179}
180
181void AggExprEmitter::VisitImplicitCastExpr(ImplicitCastExpr *E) {
182 assert(CGF.getContext().hasSameUnqualifiedType(E->getSubExpr()->getType(),

--- 372 unchanged lines hidden ---