diff options
author | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2018-01-25 14:21:55 +0000 |
---|---|---|
committer | Ivan A. Kosarev <ikosarev@accesssoftek.com> | 2018-01-25 14:21:55 +0000 |
commit | 1860b520a2327702e1b50455c87882879eb777d3 (patch) | |
tree | 7e232f614a5d8208872ccbdcc452be4855faecd8 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 929697bd55fdf384880cd6b15b3f276875085a1c (diff) | |
download | llvm-1860b520a2327702e1b50455c87882879eb777d3.zip llvm-1860b520a2327702e1b50455c87882879eb777d3.tar.gz llvm-1860b520a2327702e1b50455c87882879eb777d3.tar.bz2 |
[CodeGen] Decorate aggregate accesses with TBAA tags
Differential Revision: https://reviews.llvm.org/D41539
llvm-svn: 323421
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 4e4b15e..75071a8 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2101,16 +2101,14 @@ public: /// /// The difference to EmitAggregateCopy is that tail padding is not copied. /// This is required for correctness when assigning non-POD structures in C++. - void EmitAggregateAssign(Address DestPtr, Address SrcPtr, - QualType EltTy) { + void EmitAggregateAssign(LValue Dest, LValue Src, QualType EltTy) { bool IsVolatile = hasVolatileMember(EltTy); - EmitAggregateCopy(DestPtr, SrcPtr, EltTy, IsVolatile, true); + EmitAggregateCopy(Dest, Src, EltTy, IsVolatile, /* isAssignment= */ true); } - void EmitAggregateCopyCtor(Address DestPtr, Address SrcPtr, - QualType DestTy, QualType SrcTy) { - EmitAggregateCopy(DestPtr, SrcPtr, SrcTy, /*IsVolatile=*/false, - /*IsAssignment=*/false); + void EmitAggregateCopyCtor(LValue Dest, LValue Src) { + EmitAggregateCopy(Dest, Src, Src.getType(), + /* IsVolatile= */ false, /* IsAssignment= */ false); } /// EmitAggregateCopy - Emit an aggregate copy. @@ -2119,9 +2117,8 @@ public: /// volatile. /// \param isAssignment - If false, allow padding to be copied. This often /// yields more efficient. - void EmitAggregateCopy(Address DestPtr, Address SrcPtr, - QualType EltTy, bool isVolatile=false, - bool isAssignment = false); + void EmitAggregateCopy(LValue Dest, LValue Src, QualType EltTy, + bool isVolatile = false, bool isAssignment = false); /// GetAddrOfLocalVar - Return the address of a local variable. Address GetAddrOfLocalVar(const VarDecl *VD) { |