summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-08-21 02:17:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-08-21 02:17:08 +0000
commita94e3d1124666470d6bdde8d66ab88fe5264afc5 (patch)
tree4db620a96c31b2b973e246759289a14295aca99c /clang/lib/CodeGen/CGDecl.cpp
parent9f20e7a1bf5ab9b0cdd7702b66f1c02ba2a75220 (diff)
downloadbcm5719-llvm-a94e3d1124666470d6bdde8d66ab88fe5264afc5.tar.gz
bcm5719-llvm-a94e3d1124666470d6bdde8d66ab88fe5264afc5.zip
IRgen: Use Ty consistently in this function.
llvm-svn: 111705
Diffstat (limited to 'clang/lib/CodeGen/CGDecl.cpp')
-rw-r--r--clang/lib/CodeGen/CGDecl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/CGDecl.cpp b/clang/lib/CodeGen/CGDecl.cpp
index 0f5a4bdcfc9..29df2163738 100644
--- a/clang/lib/CodeGen/CGDecl.cpp
+++ b/clang/lib/CodeGen/CGDecl.cpp
@@ -598,7 +598,7 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D,
// 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 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D,
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 @@ void CodeGenFunction::EmitLocalBlockVarDecl(const VarDecl &D,
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 {
OpenPOWER on IntegriCloud