From f1fbda380b200923ea6275c61cd22cc99d4d75c0 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Sat, 21 Aug 2010 03:58:45 +0000 Subject: [PATCH] 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 --- lib/CodeGen/CGValue.h | 14 +++++--------- lib/CodeGen/CodeGenFunction.h | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h index 9fef3107c0..4d19a3c865 100644 --- a/lib/CodeGen/CGValue.h +++ b/lib/CodeGen/CGValue.h @@ -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; diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 8c5c380c22..5030553358 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -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 -- 2.50.1