diff options
Diffstat (limited to 'clang/lib/CodeGen/CGValue.h')
-rw-r--r-- | clang/lib/CodeGen/CGValue.h | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/clang/lib/CodeGen/CGValue.h b/clang/lib/CodeGen/CGValue.h index 9fd07bdb187..71f95abe488 100644 --- a/clang/lib/CodeGen/CGValue.h +++ b/clang/lib/CodeGen/CGValue.h @@ -29,7 +29,6 @@ namespace llvm { namespace clang { namespace CodeGen { class AggValueSlot; - class CodeGenFunction; struct CGBitFieldInfo; /// RValue - This trivial value class is used to represent the result of an @@ -320,13 +319,11 @@ public: void setBaseInfo(LValueBaseInfo Info) { BaseInfo = Info; } // simple lvalue - llvm::Value *getPointer(CodeGenFunction &CGF) const { + llvm::Value *getPointer() const { assert(isSimple()); return V; } - Address getAddress(CodeGenFunction &CGF) const { - return Address(getPointer(CGF), getAlignment()); - } + Address getAddress() const { return Address(getPointer(), getAlignment()); } void setAddress(Address address) { assert(isSimple()); V = address.getPointer(); @@ -430,8 +427,8 @@ public: return R; } - RValue asAggregateRValue(CodeGenFunction &CGF) const { - return RValue::getAggregate(getAddress(CGF), isVolatileQualified()); + RValue asAggregateRValue() const { + return RValue::getAggregate(getAddress(), isVolatileQualified()); } }; @@ -539,12 +536,14 @@ public: return AV; } - static AggValueSlot - forLValue(const LValue &LV, CodeGenFunction &CGF, IsDestructed_t isDestructed, - NeedsGCBarriers_t needsGC, IsAliased_t isAliased, - Overlap_t mayOverlap, IsZeroed_t isZeroed = IsNotZeroed, - IsSanitizerChecked_t isChecked = IsNotSanitizerChecked) { - return forAddr(LV.getAddress(CGF), LV.getQuals(), isDestructed, needsGC, + static AggValueSlot forLValue(const LValue &LV, + IsDestructed_t isDestructed, + NeedsGCBarriers_t needsGC, + IsAliased_t isAliased, + Overlap_t mayOverlap, + IsZeroed_t isZeroed = IsNotZeroed, + IsSanitizerChecked_t isChecked = IsNotSanitizerChecked) { + return forAddr(LV.getAddress(), LV.getQuals(), isDestructed, needsGC, isAliased, mayOverlap, isZeroed, isChecked); } |