aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorNikita Popov <npopov@redhat.com>2021-12-16 12:59:45 +0100
committerNikita Popov <npopov@redhat.com>2021-12-16 15:26:21 +0100
commit58c8c5326329bb55df6b9d4f7f8f43a2c82e67c1 (patch)
tree044192ac89121fbd9c7636e083c498937d5b9c58 /clang/lib/CodeGen/CodeGenFunction.h
parent8c7f2a4f871928d8734ee3f03e67d09086850b60 (diff)
downloadllvm-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.h5
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