aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/ValueMapper.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2020-11-17 10:47:43 -0500
committerMatt Arsenault <Matthew.Arsenault@amd.com>2020-11-17 11:02:04 -0500
commitc5ce6036c169522eebd2ed330de58f4980cfb45a (patch)
tree5c354354303f53437c1c82e44081cb6901d93dcd /llvm/lib/Transforms/Utils/ValueMapper.cpp
parente67d8859f205308d9e799c8448dcc1dcedc30102 (diff)
downloadllvm-c5ce6036c169522eebd2ed330de58f4980cfb45a.zip
llvm-c5ce6036c169522eebd2ed330de58f4980cfb45a.tar.gz
llvm-c5ce6036c169522eebd2ed330de58f4980cfb45a.tar.bz2
Linker: Fix linking of byref types
This wasn't properly remapping the type like with the other attributes, so this would end up hitting a verifier error after linking different modules using byref.
Diffstat (limited to 'llvm/lib/Transforms/Utils/ValueMapper.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/ValueMapper.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ValueMapper.cpp b/llvm/lib/Transforms/Utils/ValueMapper.cpp
index b2cb8cb..ec57693 100644
--- a/llvm/lib/Transforms/Utils/ValueMapper.cpp
+++ b/llvm/lib/Transforms/Utils/ValueMapper.cpp
@@ -901,7 +901,7 @@ void Mapper::remapInstruction(Instruction *I) {
AttributeList Attrs = CB->getAttributes();
for (unsigned i = 0; i < Attrs.getNumAttrSets(); ++i) {
for (Attribute::AttrKind TypedAttr :
- {Attribute::ByVal, Attribute::StructRet}) {
+ {Attribute::ByVal, Attribute::StructRet, Attribute::ByRef}) {
if (Type *Ty = Attrs.getAttribute(i, TypedAttr).getValueAsType()) {
Attrs = Attrs.replaceAttributeType(C, i, TypedAttr,
TypeMapper->remapType(Ty));