]> granicus.if.org Git - clang/commitdiff
Further beautification: this pointer can now be typed.
authorJohn McCall <rjmccall@apple.com>
Thu, 16 Sep 2010 03:16:41 +0000 (03:16 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 16 Sep 2010 03:16:41 +0000 (03:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114061 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CGValue.h

index 04467c564fde55949eec939d9ddd8ff6ca9098a9..23b358d9ad317f535f0485ca29f7e8bce04120eb 100644 (file)
@@ -324,7 +324,7 @@ public:
 /// An aggregate value slot.
 class AggValueSlot {
   /// The address.
-  uintptr_t AddrAndFlags;
+  llvm::Value *Addr;
   
   // Associated flags.
   bool VolatileFlag : 1;
@@ -336,7 +336,7 @@ public:
   /// aggregate value is being ignored.
   static AggValueSlot ignored() {
     AggValueSlot AV;
-    AV.AddrAndFlags = 0;
+    AV.Addr = 0;
     AV.VolatileFlag = AV.LifetimeFlag = AV.RequiresGCollection = 0;
     return AV;
   }
@@ -353,7 +353,7 @@ public:
                               bool LifetimeExternallyManaged,
                               bool RequiresGCollection=false) {
     AggValueSlot AV;
-    AV.AddrAndFlags = reinterpret_cast<uintptr_t>(Addr);
+    AV.Addr = Addr;
     AV.VolatileFlag = Volatile;
     AV.LifetimeFlag = LifetimeExternallyManaged;
     AV.RequiresGCollection = RequiresGCollection;
@@ -385,11 +385,11 @@ public:
   }
   
   llvm::Value *getAddr() const {
-    return reinterpret_cast<llvm::Value*>(AddrAndFlags);
+    return Addr;
   }
 
   bool isIgnored() const {
-    return AddrAndFlags == 0;
+    return Addr == 0;
   }
 
   RValue asRValue() const {