From: Benjamin Kramer Date: Mon, 2 Mar 2015 16:42:56 +0000 (+0000) Subject: Avoid assertion in MSVC 2013 debug builds. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8bbe122af2d0d73083950194141dad35f463be5c;p=oota-llvm.git Avoid assertion in MSVC 2013 debug builds. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230972 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index dcb2ab0a333..00dc717e1e4 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -5419,7 +5419,7 @@ UpdateNodeOperands(SDNode *N, ArrayRef 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.