diff options
author | Nikita Popov <npopov@redhat.com> | 2022-03-18 11:11:00 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-03-18 11:13:25 +0100 |
commit | 74992f4a5bb79e2084abdef406ef2e5aa2024368 (patch) | |
tree | 254bc2134a74d64f2c84d30d072e6be8e32deb5e /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 4d2096482d55da4528e62bfe38e40826d192cf30 (diff) | |
download | llvm-74992f4a5bb79e2084abdef406ef2e5aa2024368.zip llvm-74992f4a5bb79e2084abdef406ef2e5aa2024368.tar.gz llvm-74992f4a5bb79e2084abdef406ef2e5aa2024368.tar.bz2 |
[CodeGen] Store element type in DominatingValue<RValue>
For aggregate rvalues, we need to store the element type in the
dominating value, so we can recover the element type for the
address.
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 7c6dbf8..24000b9 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -201,10 +201,11 @@ template <> struct DominatingValue<RValue> { AggregateAddress, ComplexAddress }; llvm::Value *Value; + llvm::Type *ElementType; unsigned K : 3; unsigned Align : 29; - saved_type(llvm::Value *v, Kind k, unsigned a = 0) - : Value(v), K(k), Align(a) {} + saved_type(llvm::Value *v, llvm::Type *e, Kind k, unsigned a = 0) + : Value(v), ElementType(e), K(k), Align(a) {} public: static bool needsSaving(RValue value); |