From 87ebd9a36ffb547c18bb3acce2fa90f56d6c5d9d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 25 Feb 2022 09:59:50 +0100 Subject: [IR] Use CallBase::getParamElementType() (NFC) As this method now exists on CallBase, use it rather than the one on AttributeList. --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp index 2547046be536..dee8c4daaada 100644 --- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp @@ -4054,7 +4054,7 @@ void BitcodeReader::propagateAttributeTypes(CallBase *CB, if (!CI.hasArg()) continue; - if (CI.isIndirect && !CB->getAttributes().getParamElementType(ArgNo)) { + if (CI.isIndirect && !CB->getParamElementType(ArgNo)) { Type *ElemTy = ArgsTys[ArgNo]->getPointerElementType(); CB->addParamAttr( ArgNo, Attribute::get(Context, Attribute::ElementType, ElemTy)); @@ -4067,7 +4067,7 @@ void BitcodeReader::propagateAttributeTypes(CallBase *CB, switch (CB->getIntrinsicID()) { case Intrinsic::preserve_array_access_index: case Intrinsic::preserve_struct_access_index: - if (!CB->getAttributes().getParamElementType(0)) { + if (!CB->getParamElementType(0)) { Type *ElTy = ArgsTys[0]->getPointerElementType(); Attribute NewAttr = Attribute::get(Context, Attribute::ElementType, ElTy); CB->addParamAttr(0, NewAttr); -- cgit v1.2.3