[STLExtras] Add size() for ranges, and remove distance()
ClosedPublic

Authored by vsk on Wed, May 16, 2:18 PM.

Details

Summary

r332057 introduced distance() for ranges. Based on post-commit feedback,
this renames distance() to size(). The new size() is also only enabled
when the operation is O(1).

Diff Detail

Repository
rL LLVM
vsk created this revision.Wed, May 16, 2:18 PM

I'm good with this (since I suggested it) if @craig.topper is.

craig.topper accepted this revision.Wed, May 16, 4:06 PM

LGTM

lib/CodeGen/ImplicitNullChecks.cpp
600 ↗(On Diff #147177)

Can you just change this to NumDefs == 1? The end for defs() is calculated with MI->getDesc().getNumDefs() which is what NumDefs is assigned to.

This revision is now accepted and ready to land.Wed, May 16, 4:06 PM
This revision was automatically updated to reflect the committed changes.