From f43de1879a5cba695470de29af4202c71c962c6a Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Mon, 2 Mar 2015 16:42:56 +0000 Subject: [PATCH] Avoid assertion in MSVC 2013 debug builds. llvm-svn: 230972 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index dcb2ab0a333d..00dc717e1e47 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/llvm/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.