[ObjCARC] Drop nullary clang.arc.attachedcall bundles in autoupgrade.
In certain use-cases, these can be emitted by old compilers, but the operand is now always required. These are only used for optimizations, so it's safe to drop them if they happen to have the now-invalid format. The semantically-required call is already a separate instruction. Differential Revision: https://reviews.llvm.org/D123811
This commit is contained in:
@@ -5138,6 +5138,10 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
}
|
||||
}
|
||||
|
||||
// Upgrade the bundles if needed.
|
||||
if (!OperandBundles.empty())
|
||||
UpgradeOperandBundles(OperandBundles);
|
||||
|
||||
I = InvokeInst::Create(FTy, Callee, NormalBB, UnwindBB, Ops,
|
||||
OperandBundles);
|
||||
ResTypeID = getContainedTypeID(FTyID);
|
||||
@@ -5235,6 +5239,10 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
}
|
||||
}
|
||||
|
||||
// Upgrade the bundles if needed.
|
||||
if (!OperandBundles.empty())
|
||||
UpgradeOperandBundles(OperandBundles);
|
||||
|
||||
I = CallBrInst::Create(FTy, Callee, DefaultDest, IndirectDests, Args,
|
||||
OperandBundles);
|
||||
ResTypeID = getContainedTypeID(FTyID);
|
||||
@@ -5846,6 +5854,10 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
|
||||
}
|
||||
}
|
||||
|
||||
// Upgrade the bundles if needed.
|
||||
if (!OperandBundles.empty())
|
||||
UpgradeOperandBundles(OperandBundles);
|
||||
|
||||
I = CallInst::Create(FTy, Callee, Args, OperandBundles);
|
||||
ResTypeID = getContainedTypeID(FTyID);
|
||||
OperandBundles.clear();
|
||||
|
||||
Reference in New Issue
Block a user