X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FAnalysis%2FStratifiedSets.h;h=fd3fbc0d86ad631fc2a413c35bc7dfec8a965dc0;hp=90e840f925234ce5e0483383ce25d8edefe192b0;hb=609d95290a4d913139ba0b46f5b5b982dc4b1d96;hpb=41b6e327f7dedfb9d3020f60f6c6804efeb75b16 diff --git a/lib/Analysis/StratifiedSets.h b/lib/Analysis/StratifiedSets.h index 90e840f9252..fd3fbc0d86a 100644 --- a/lib/Analysis/StratifiedSets.h +++ b/lib/Analysis/StratifiedSets.h @@ -21,6 +21,7 @@ #include #include #include +#include #include namespace llvm { @@ -53,8 +54,7 @@ struct StratifiedLink { // Optional because Optional would // eat up a considerable amount of extra memory, after struct // padding/alignment is taken into account. - static LLVM_CONSTEXPR auto SetSentinel = - std::numeric_limits::max(); + static const StratifiedIndex SetSentinel; // \brief The index for the set "above" current StratifiedIndex Above; @@ -319,7 +319,7 @@ template class StratifiedSetsBuilder { } StratifiedIndex Number = StratLinks.size(); - Remaps.insert({Link.Number, Number}); + Remaps.insert(std::make_pair(Link.Number, Number)); StratLinks.push_back(Link.getLink()); } @@ -363,7 +363,7 @@ template class StratifiedSetsBuilder { SmallSet Visited; for (unsigned I = 0, E = Links.size(); I < E; ++I) { auto CurrentIndex = getHighestParentAbove(I); - if (!Visited.insert(CurrentIndex)) { + if (!Visited.insert(CurrentIndex).second) { continue; } @@ -494,7 +494,7 @@ private: // necessary. bool addAtMerging(const T &ToAdd, StratifiedIndex Index) { StratifiedInfo Info = {Index}; - auto Pair = Values.insert({ToAdd, Info}); + auto Pair = Values.insert(std::make_pair(ToAdd, Info)); if (Pair.second) return true;