mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-21 03:05:26 -04:00
[STLExtras] Add size() for ranges, and remove distance()
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). Differential Revision: https://reviews.llvm.org/D46976 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332551 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -597,7 +597,7 @@ MachineInstr *ImplicitNullChecks::insertFaultingInstr(
|
||||
unsigned DefReg = NoRegister;
|
||||
if (NumDefs != 0) {
|
||||
DefReg = MI->defs().begin()->getReg();
|
||||
assert(distance(MI->defs()) == 1 && "expected exactly one def!");
|
||||
assert(NumDefs == 1 && "expected exactly one def!");
|
||||
}
|
||||
|
||||
FaultMaps::FaultKind FK;
|
||||
|
||||
Reference in New Issue
Block a user