Commit 34d881d7 authored by Tom Stellard's avatar Tom Stellard
Browse files

Merging r328755:

------------------------------------------------------------------------
r328755 | gbiv | 2018-03-28 20:12:03 -0700 (Wed, 28 Mar 2018) | 10 lines

[MemorySSA] Turn an assert into a condition

Eli pointed out that variadic functions are totally a thing, so this
assert is incorrect.

No test-case is provided, since the only way this assert fires is if a
specific DenseMap falls back to doing `isEqual` checks, and that seems
fairly brittle (and requires a pyramid of growing
`call void (i8, ...) @varargs(i8 0)`).

------------------------------------------------------------------------

llvm-svn: 329670
parent 9eec47d7
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -159,8 +159,8 @@ public:
    if (CS.getCalledValue() != Other.CS.getCalledValue())
      return false;

    assert(CS.arg_size() == Other.CS.arg_size());
    return std::equal(CS.arg_begin(), CS.arg_end(), Other.CS.arg_begin());
    return CS.arg_size() == Other.CS.arg_size() &&
           std::equal(CS.arg_begin(), CS.arg_end(), Other.CS.arg_begin());
  }

private: