diff options
author | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-09-09 15:08:12 +0000 |
commit | 1eb4433ac451dc16f4133a88af2d002ac26c58ef (patch) | |
tree | 07065b80cb7787bb7b9ffcb985196007a57e86f7 /lib/CodeGen/CGValue.h | |
parent | 79d39f92590cf2e91bf81486b02cd1156d13ca54 (diff) |
Remove tabs, and whitespace cleanups.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81346 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGValue.h')
-rw-r--r-- | lib/CodeGen/CGValue.h | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lib/CodeGen/CGValue.h b/lib/CodeGen/CGValue.h index 5aaf951a54..fe97afad6e 100644 --- a/lib/CodeGen/CGValue.h +++ b/lib/CodeGen/CGValue.h @@ -37,14 +37,14 @@ class RValue { // TODO: Encode this into the low bit of pointer for more efficient // return-by-value. enum { Scalar, Complex, Aggregate } Flavor; - + bool Volatile:1; public: - + bool isScalar() const { return Flavor == Scalar; } bool isComplex() const { return Flavor == Complex; } bool isAggregate() const { return Flavor == Aggregate; } - + bool isVolatileQualified() const { return Volatile; } /// getScalar() - Return the Value* of this scalar value. @@ -58,13 +58,13 @@ public: std::pair<llvm::Value *, llvm::Value *> getComplexVal() const { return std::pair<llvm::Value *, llvm::Value *>(V1, V2); } - + /// getAggregateAddr() - Return the Value* of the address of the aggregate. llvm::Value *getAggregateAddr() const { assert(isAggregate() && "Not an aggregate!"); return V1; } - + static RValue get(llvm::Value *V) { RValue ER; ER.V1 = V; @@ -106,7 +106,7 @@ public: /// bitrange. class LValue { // FIXME: alignment? - + enum { Simple, // This is a normal l-value, use getAddress(). VectorElt, // This is a vector element l-value (V[i]), use getVector* @@ -123,16 +123,16 @@ class LValue { Weak, // __weak object expression Strong // __strong object expression }; - + llvm::Value *V; - + union { // Index into a vector subscript: V[i] llvm::Value *VectorIdx; // ExtVector element subset: V.xyx llvm::Constant *VectorElts; - + // BitField start bit and size struct { unsigned short StartBit; @@ -152,7 +152,7 @@ class LValue { // objective-c's ivar bool Ivar:1; - + // LValue is non-gc'able for any reason, including being a parameter or local // variable. bool NonGC: 1; @@ -161,7 +161,7 @@ class LValue { bool GlobalObjCRef : 1; // objective-c's gc attributes - unsigned ObjCType : 2; + unsigned ObjCType : 2; // address space unsigned AddressSpace; @@ -175,7 +175,7 @@ private: R.ObjCType = None; R.Ivar = R.NonGC = R.GlobalObjCRef = false; } - + public: bool isSimple() const { return LVType == Simple; } bool isVectorElt() const { return LVType == VectorElt; } @@ -187,10 +187,10 @@ public: bool isVolatileQualified() const { return Volatile; } bool isRestrictQualified() const { return Restrict; } unsigned getQualifiers() const { - return (Volatile ? QualType::Volatile : 0) | + return (Volatile ? QualType::Volatile : 0) | (Restrict ? QualType::Restrict : 0); } - + bool isObjCIvar() const { return Ivar; } bool isNonGC () const { return NonGC; } bool isGlobalObjCRef() const { return GlobalObjCRef; } @@ -206,7 +206,7 @@ public: static void SetGlobalObjCRef(LValue& R, bool iValue) { R.GlobalObjCRef = iValue; } - + static void SetObjCNonGC(LValue& R, bool iValue) { R.NonGC = iValue; } @@ -218,7 +218,7 @@ public: else R.ObjCType = None; } - + // simple lvalue llvm::Value *getAddress() const { assert(isSimple()); return V; } // vector elt lvalue @@ -267,7 +267,7 @@ public: SetObjCType(GCAttrs, R); return R; } - + static LValue MakeVectorElt(llvm::Value *Vec, llvm::Value *Idx, unsigned Qualifiers) { LValue R; @@ -277,7 +277,7 @@ public: SetQualifiers(Qualifiers,R); return R; } - + static LValue MakeExtVectorElt(llvm::Value *Vec, llvm::Constant *Elts, unsigned Qualifiers) { LValue R; @@ -312,8 +312,8 @@ public: SetQualifiers(Qualifiers,R); return R; } - - static LValue MakeKVCRef(const ObjCImplicitSetterGetterRefExpr *E, + + static LValue MakeKVCRef(const ObjCImplicitSetterGetterRefExpr *E, unsigned Qualifiers) { LValue R; R.LVType = KVCRef; |