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 | 9b1335eca844fb364e78f5de1f5efa968900a120 (patch) | |
tree | 4470a163ffa4744697e048905633a2344b2762a6 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | fd2c607026c9b70f9e5afe58fde7e5771ce5e53f (diff) | |
download | bcm5719-llvm-9b1335eca844fb364e78f5de1f5efa968900a120.tar.gz bcm5719-llvm-9b1335eca844fb364e78f5de1f5efa968900a120.zip |
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.
llvm-svn: 59615
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 5d99dba69a8..05b2793456b 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/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); |