From 70573dcd9f002307584b63033e6e017474e11b0c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Wed, 19 Nov 2014 07:49:26 +0000 Subject: Update SetVector to rely on the underlying set's insert to return a pair This is to be consistent with StringSet and ultimately with the standard library's associative container insert function. This lead to updating SmallSet::insert to return pair, and then to update SmallPtrSet::insert to return pair, and then to update all the existing users of those functions... llvm-svn: 222334 --- llvm/lib/Analysis/ConstantFolding.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/ConstantFolding.cpp') diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index cd25acb..fd8f2ae 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -981,7 +981,7 @@ ConstantFoldConstantExpressionImpl(const ConstantExpr *CE, const DataLayout *TD, // Recursively fold the ConstantExpr's operands. If we have already folded // a ConstantExpr, we don't have to process it again. if (ConstantExpr *NewCE = dyn_cast(NewC)) { - if (FoldedOps.insert(NewCE)) + if (FoldedOps.insert(NewCE).second) NewC = ConstantFoldConstantExpressionImpl(NewCE, TD, TLI, FoldedOps); } Ops.push_back(NewC); -- cgit v1.1