File tree Expand file tree Collapse file tree 1 file changed +11
-14
lines changed
Expand file tree Collapse file tree 1 file changed +11
-14
lines changed Original file line number Diff line number Diff line change @@ -372,22 +372,19 @@ const Instruction* BasicBlock::getFirstNonPHI() const {
372372}
373373
374374BasicBlock::const_iterator BasicBlock::getFirstNonPHIIt () const {
375- const Instruction *I = [&]() -> const Instruction * {
376- for (const Instruction &I : *this )
377- if (!isa<PHINode>(I))
378- return &I;
379- return nullptr ;
380- }();
375+ for (const Instruction &I : *this ) {
376+ if (isa<PHINode>(I))
377+ continue ;
381378
382- if (!I)
383- return end ();
379+ BasicBlock::const_iterator It = I.getIterator ();
380+ // Set the head-inclusive bit to indicate that this iterator includes
381+ // any debug-info at the start of the block. This is a no-op unless the
382+ // appropriate CMake flag is set.
383+ It.setHeadBit (true );
384+ return It;
385+ }
384386
385- BasicBlock::const_iterator It = I->getIterator ();
386- // Set the head-inclusive bit to indicate that this iterator includes
387- // any debug-info at the start of the block. This is a no-op unless the
388- // appropriate CMake flag is set.
389- It.setHeadBit (true );
390- return It;
387+ return end ();
391388}
392389
393390const Instruction *BasicBlock::getFirstNonPHIOrDbg (bool SkipPseudoOp) const {
You can’t perform that action at this time.
0 commit comments