diff options
author | Nikita Popov <npopov@redhat.com> | 2021-12-16 12:59:45 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2021-12-16 15:26:21 +0100 |
commit | 58c8c5326329bb55df6b9d4f7f8f43a2c82e67c1 (patch) | |
tree | 044192ac89121fbd9c7636e083c498937d5b9c58 /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 8c7f2a4f871928d8734ee3f03e67d09086850b60 (diff) | |
download | llvm-58c8c5326329bb55df6b9d4f7f8f43a2c82e67c1.zip llvm-58c8c5326329bb55df6b9d4f7f8f43a2c82e67c1.tar.gz llvm-58c8c5326329bb55df6b9d4f7f8f43a2c82e67c1.tar.bz2 |
[CodeGen] Avoid more pointer element type accesses
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index 6b310d3..411a36a 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2494,8 +2494,9 @@ public: LValue MakeAddrLValue(llvm::Value *V, QualType T, CharUnits Alignment, AlignmentSource Source = AlignmentSource::Type) { - return LValue::MakeAddr(Address(V, Alignment), T, getContext(), - LValueBaseInfo(Source), CGM.getTBAAAccessInfo(T)); + Address Addr(V, ConvertTypeForMem(T), Alignment); + return LValue::MakeAddr(Addr, T, getContext(), LValueBaseInfo(Source), + CGM.getTBAAAccessInfo(T)); } LValue |