]> granicus.if.org Git - clang/commitdiff
IRgen/CGValue: Give MakeAddrLValue() an alignment argument, and eliminate old form...
authorDaniel Dunbar <daniel@zuster.org>
Sat, 21 Aug 2010 03:58:45 +0000 (03:58 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Sat, 21 Aug 2010 03:58:45 +0000 (03:58 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111723 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGValue.h
lib/CodeGen/CodeGenFunction.h

index 9fef3107c0fc8fb4399f604a821899c744851e99..4d19a3c865deba6406499d84eccfd71e9f61e9e3 100644 (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;
index 8c5c380c22d129805ae5b1ce60f69b09ab446617..503055335826fde5341b5f20493187df76d10511 100644 (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