[cfe-commits] r111705 - /cfe/trunk/lib/CodeGen/CGDecl.cpp
Daniel Dunbar
daniel at zuster.org
Fri Aug 20 19:17:08 PDT 2010
Author: ddunbar
Date: Fri Aug 20 21:17:08 2010
New Revision: 111705
URL: http://llvm.org/viewvc/llvm-project?rev=111705&view=rev
Log:
IRgen: Use Ty consistently in this function.
Modified:
cfe/trunk/lib/CodeGen/CGDecl.cpp
Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=111705&r1=111704&r2=111705&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Fri Aug 20 21:17:08 2010
@@ -598,7 +598,7 @@
// Get the element type.
const llvm::Type *LElemTy = ConvertTypeForMem(Ty);
const llvm::Type *LElemPtrTy =
- llvm::PointerType::get(LElemTy, D.getType().getAddressSpace());
+ llvm::PointerType::get(LElemTy, Ty.getAddressSpace());
llvm::Value *VLASize = EmitVLASize(Ty);
@@ -703,13 +703,12 @@
Loc = Builder.CreateStructGEP(DeclPtr, getByRefValueLLVMField(&D),
D.getNameAsString());
- bool isVolatile =
- getContext().getCanonicalType(D.getType()).isVolatileQualified();
+ bool isVolatile = getContext().getCanonicalType(Ty).isVolatileQualified();
// If the initializer was a simple constant initializer, we can optimize it
// in various ways.
if (IsSimpleConstantInitializer) {
- llvm::Constant *Init = CGM.EmitConstantExpr(D.getInit(),D.getType(),this);
+ llvm::Constant *Init = CGM.EmitConstantExpr(D.getInit(), Ty,this);
assert(Init != 0 && "Wasn't a simple constant init?");
llvm::Value *AlignVal =
@@ -756,7 +755,7 @@
EmitStoreOfScalar(RV.getScalarVal(), Loc, false, Ty);
} else if (!hasAggregateLLVMType(Init->getType())) {
llvm::Value *V = EmitScalarExpr(Init);
- EmitStoreOfScalar(V, Loc, isVolatile, D.getType());
+ EmitStoreOfScalar(V, Loc, isVolatile, Ty);
} else if (Init->getType()->isAnyComplexType()) {
EmitComplexExprIntoAddr(Init, Loc, isVolatile);
} else {
More information about the cfe-commits
mailing list