Avoid assertion in MSVC 2013 debug builds.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230972 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2015-03-02 16:42:56 +00:00
parent 6cc6b419e4
commit 8bbe122af2

View File

@ -5419,7 +5419,7 @@ UpdateNodeOperands(SDNode *N, ArrayRef<SDValue> Ops) {
"Update with wrong number of operands");
// If no operands changed just return the input node.
if (std::equal(Ops.begin(), Ops.end(), N->op_begin()))
if (!Ops.empty() && std::equal(Ops.begin(), Ops.end(), N->op_begin()))
return N;
// See if the modified node already exists.