IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form of MakeAddr().
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111723 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h
index 9fef310..4d19a3c 100644
--- a/lib/CodeGen/CGValue.h
+++ b/lib/CodeGen/CGValue.h
@@ -251,8 +251,11 @@
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 @@
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;
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index 8c5c380..5030553 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -976,7 +976,7 @@
}
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