[cfe-commits] r114061 - /cfe/trunk/lib/CodeGen/CGValue.h
John McCall
rjmccall at apple.com
Wed Sep 15 20:16:42 PDT 2010
Author: rjmccall
Date: Wed Sep 15 22:16:41 2010
New Revision: 114061
URL: http://llvm.org/viewvc/llvm-project?rev=114061&view=rev
Log:
Further beautification: this pointer can now be typed.
Modified:
cfe/trunk/lib/CodeGen/CGValue.h
Modified: cfe/trunk/lib/CodeGen/CGValue.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGValue.h?rev=114061&r1=114060&r2=114061&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGValue.h (original)
+++ cfe/trunk/lib/CodeGen/CGValue.h Wed Sep 15 22:16:41 2010
@@ -324,7 +324,7 @@
/// An aggregate value slot.
class AggValueSlot {
/// The address.
- uintptr_t AddrAndFlags;
+ llvm::Value *Addr;
// Associated flags.
bool VolatileFlag : 1;
@@ -336,7 +336,7 @@
/// 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 @@
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 @@
}
llvm::Value *getAddr() const {
- return reinterpret_cast<llvm::Value*>(AddrAndFlags);
+ return Addr;
}
bool isIgnored() const {
- return AddrAndFlags == 0;
+ return Addr == 0;
}
RValue asRValue() const {
More information about the cfe-commits
mailing list