diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 09:36:46 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-11-19 09:36:46 +0000 |
commit | ed3849b456d64d124bddc7ac044f3ce590bd9d69 (patch) | |
tree | 193bbf25cb13d521e5b32f8e680d2a215f8b4153 /lib/CodeGen/CodeGenFunction.h | |
parent | 8fbc1540966901a0b2b033c92f4c4257c08621f8 (diff) |
Fix redundant load of bit-fields on assignment (to get the updated
value).
- Use extra argument to EmitStoreThroughLValue to provide place to
write update bit-field value if caller requires it.
- This fixes several FIXMEs.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@59615 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index 5d99dba69a..05b2793456 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -32,6 +32,7 @@ namespace llvm { class BasicBlock; class Module; class SwitchInst; + class Value; } namespace clang { @@ -446,8 +447,16 @@ public: void EmitStoreThroughLValue(RValue Src, LValue Dst, QualType Ty); void EmitStoreThroughExtVectorComponentLValue(RValue Src, LValue Dst, QualType Ty); - void EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, QualType Ty); void EmitStoreThroughPropertyRefLValue(RValue Src, LValue Dst, QualType Ty); + + /// EmitStoreThroughLValue - Store Src into Dst with same + /// constraints as EmitStoreThroughLValue. + /// + /// \param Result [out] - If non-null, this will be set to a Value* + /// for the bit-field contents after the store, appropriate for use + /// as the result of an assignment to the bit-field. + void EmitStoreThroughBitfieldLValue(RValue Src, LValue Dst, QualType Ty, + llvm::Value **Result=0); // Note: only availabe for agg return types LValue EmitBinaryOperatorLValue(const BinaryOperator *E); |