IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr().

llvm-svn: 111723
This commit is contained in:
Daniel Dunbar 2010-08-21 03:58:45 +00:00
parent 4bb04cee6a
commit 226bddaff1
2 changed files with 6 additions and 10 deletions

View File

@ -251,8 +251,11 @@ public:
return KVCRefExpr;
}
static LValue MakeAddr(llvm::Value *V, Qualifiers Quals,
unsigned Alignment = 0) {
static LValue MakeAddr(llvm::Value *V, QualType T, unsigned Alignment,
ASTContext &Context) {
Qualifiers Quals = Context.getCanonicalType(T).getQualifiers();
Quals.setObjCGCAttr(Context.getObjCGCAttrKind(T));
LValue R;
R.LVType = Simple;
R.V = V;
@ -260,13 +263,6 @@ public:
return R;
}
static LValue MakeAddr(llvm::Value *V, QualType T, ASTContext &Context) {
Qualifiers Quals = Context.getCanonicalType(T).getQualifiers();
Quals.setObjCGCAttr(Context.getObjCGCAttrKind(T));
return MakeAddr(V, Quals);
}
static LValue MakeVectorElt(llvm::Value *Vec, llvm::Value *Idx,
unsigned CVR) {
LValue R;

View File

@ -976,7 +976,7 @@ public:
}
LValue MakeAddrLValue(llvm::Value *V, QualType T) {
return LValue::MakeAddr(V, T, getContext());
return LValue::MakeAddr(V, T, 0, getContext());
}
/// CreateTempAlloca - This creates a alloca and inserts it into the entry