Index: include/llvm/ADT/DenseSet.h =================================================================== --- include/llvm/ADT/DenseSet.h +++ include/llvm/ADT/DenseSet.h @@ -168,12 +168,11 @@ template std::pair insert_as(const ValueT &V, const LookupKeyT &LookupKey) { - return insert_as(ValueT(V), LookupKey); + return TheMap.insert_as({V, detail::DenseSetEmpty()}, LookupKey); } template std::pair insert_as(ValueT &&V, const LookupKeyT &LookupKey) { - detail::DenseSetEmpty Empty; - return TheMap.insert_as(std::make_pair(std::move(V), Empty), LookupKey); + return TheMap.insert_as({std::move(V), detail::DenseSetEmpty()}, LookupKey); } // Range insertion of values.