diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-09-29 09:33:55 -0400 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2020-10-16 11:05:02 -0400 |
commit | 0a7cd99a702595ccf73c957be0127af9f25fb9a2 (patch) | |
tree | 01837b082bd0229afc320b4371fe3558b1a9758f /llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | |
parent | 97533b10b27db058cc77c81a4f964b66392871c6 (diff) | |
download | llvm-0a7cd99a702595ccf73c957be0127af9f25fb9a2.zip llvm-0a7cd99a702595ccf73c957be0127af9f25fb9a2.tar.gz llvm-0a7cd99a702595ccf73c957be0127af9f25fb9a2.tar.bz2 |
Reapply "OpaquePtr: Add type to sret attribute"
This reverts commit eb9f7c28e5fe6d75fed3587023e17f2997c8024b.
Previously this was incorrectly handling linking of the contained
type, so this merges the fixes from D88973.
Diffstat (limited to 'llvm/lib/Bitcode/Writer/ValueEnumerator.cpp')
-rw-r--r-- | llvm/lib/Bitcode/Writer/ValueEnumerator.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp index 8827956..4ae25f7 100644 --- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -973,6 +973,8 @@ void ValueEnumerator::incorporateFunction(const Function &F) { EnumerateValue(&I); if (I.hasAttribute(Attribute::ByVal)) EnumerateType(I.getParamByValType()); + else if (I.hasAttribute(Attribute::StructRet)) + EnumerateType(I.getParamStructRetType()); } FirstFuncConstantID = Values.size(); |