File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
llvm/lib/Transforms/Utils Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -4220,19 +4220,19 @@ void llvm::maybeMarkSanitizerLibraryCallNoBuiltin(
4220
4220
}
4221
4221
4222
4222
bool llvm::canReplaceOperandWithVariable (const Instruction *I, unsigned OpIdx) {
4223
+ const auto *Op = I->getOperand (OpIdx);
4223
4224
// We can't have a PHI with a metadata type.
4224
- if (I-> getOperand (OpIdx) ->getType ()->isMetadataTy ())
4225
+ if (Op ->getType ()->isMetadataTy ())
4225
4226
return false ;
4226
4227
4227
4228
// swifterror pointers can only be used by a load, store, or as a swifterror
4228
4229
// argument; swifterror pointers are not allowed to be used in select or phi
4229
4230
// instructions.
4230
- if (OpIdx < I->getNumOperands ())
4231
- if (I->getOperand (OpIdx)->isSwiftError ())
4232
- return false ;
4231
+ if (Op->isSwiftError ())
4232
+ return false ;
4233
4233
4234
4234
// Early exit.
4235
- if (!isa<Constant>(I-> getOperand (OpIdx) ))
4235
+ if (!isa<Constant>(Op ))
4236
4236
return true ;
4237
4237
4238
4238
switch (I->getOpcode ()) {
You can’t perform that action at this time.
0 commit comments