diff options
author | Vedant Kumar <vsk@apple.com> | 2018-05-16 23:20:42 +0000 |
---|---|---|
committer | Vedant Kumar <vsk@apple.com> | 2018-05-16 23:20:42 +0000 |
commit | 5a0872c2b751fd339e10c1b9d29ed4a9e62a323d (patch) | |
tree | 60578e1838b47b5da4279a36a8c17be782946192 /llvm/lib/CodeGen/ImplicitNullChecks.cpp | |
parent | ae83159530f2657d35bc2543065e23256489d7ea (diff) | |
download | bcm5719-llvm-5a0872c2b751fd339e10c1b9d29ed4a9e62a323d.tar.gz bcm5719-llvm-5a0872c2b751fd339e10c1b9d29ed4a9e62a323d.zip |
[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
llvm-svn: 332551
Diffstat (limited to 'llvm/lib/CodeGen/ImplicitNullChecks.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ImplicitNullChecks.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/ImplicitNullChecks.cpp b/llvm/lib/CodeGen/ImplicitNullChecks.cpp index 285f746875e..98c3039863e 100644 --- a/llvm/lib/CodeGen/ImplicitNullChecks.cpp +++ b/llvm/lib/CodeGen/ImplicitNullChecks.cpp @@ -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; |