[NFC] More get/removeAttribute() cleanup

This commit is contained in:
Arthur Eubanks
2021-08-17 20:25:16 -07:00
parent de0ae9e89e
commit 3f4d00bc3b
30 changed files with 131 additions and 153 deletions

View File

@@ -5567,9 +5567,8 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
// Remove incompatible attributes on function calls.
if (auto *CI = dyn_cast<CallBase>(&I)) {
CI->removeAttributes(AttributeList::ReturnIndex,
AttributeFuncs::typeIncompatible(
CI->getFunctionType()->getReturnType()));
CI->removeRetAttrs(AttributeFuncs::typeIncompatible(
CI->getFunctionType()->getReturnType()));
for (unsigned ArgNo = 0; ArgNo < CI->arg_size(); ++ArgNo)
CI->removeParamAttrs(ArgNo, AttributeFuncs::typeIncompatible(