diff options
author | Nikita Popov <npopov@redhat.com> | 2022-01-28 10:36:12 +0100 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-01-28 10:36:28 +0100 |
commit | 91e5096d82d8c4dbfe6f01527c25e16f5e2ba883 (patch) | |
tree | 89e108d56787a1a7b70ec17607ab0c052291f74e /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 96400f179ff640544964f3e51a756e41eb971a43 (diff) | |
download | llvm-91e5096d82d8c4dbfe6f01527c25e16f5e2ba883.zip llvm-91e5096d82d8c4dbfe6f01527c25e16f5e2ba883.tar.gz llvm-91e5096d82d8c4dbfe6f01527c25e16f5e2ba883.tar.bz2 |
[InlineFunction] Use phis() iterator (NFC)
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index c9f872f..39f37b4 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -671,12 +671,9 @@ static void HandleInlinedEHPad(InvokeInst *II, BasicBlock *FirstNewBlock, // edge from this block. SmallVector<Value *, 8> UnwindDestPHIValues; BasicBlock *InvokeBB = II->getParent(); - for (Instruction &I : *UnwindDest) { + for (PHINode &PHI : UnwindDest->phis()) { // Save the value to use for this edge. - PHINode *PHI = dyn_cast<PHINode>(&I); - if (!PHI) - break; - UnwindDestPHIValues.push_back(PHI->getIncomingValueForBlock(InvokeBB)); + UnwindDestPHIValues.push_back(PHI.getIncomingValueForBlock(InvokeBB)); } // Add incoming-PHI values to the unwind destination block for the given basic |