llvm-project
68852812 - [Support] Do not use `llvm::size` in `getLoopPreheader` (#94540)

Commit
1 year ago
[Support] Do not use `llvm::size` in `getLoopPreheader` (#94540) `BlockT *LoopBase<BlockT, LoopT>::getLoopPreheader()` was changed in 7243607867393a2b8ccd477e95e6f62d00f3206f to use `llvm::size` rather than the checking that `child_begin() + 1 == child_end()`. `llvm::size` requires that `std::distance` be O(1) and hence that clients support random access. Use `llvm::hasSingleElement` instead.
Author
Parents
Loading