[CFLAA] And even more MSVC fixes
authorHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 23:50:01 +0000 (23:50 +0000)
committerHal Finkel <hfinkel@anl.gov>
Tue, 2 Sep 2014 23:50:01 +0000 (23:50 +0000)
Remove a couple more initializer lists and constexpr dependencies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216998 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/CFLAliasAnalysis.cpp
lib/Analysis/StratifiedSets.h

index e942529176d84e8b6752e5cb4c8b78791ce019d6..05a472d761b56ac36dce86215bf3f2a01ee11d45 100644 (file)
@@ -73,6 +73,9 @@ static Optional<Value *> getTargetValue(Instruction *);
 // This notes that we should ignore those.
 static bool hasUsefulEdges(Instruction *);
 
+const StratifiedIndex StratifiedLink::SetSentinel =
+  std::numeric_limits<StratifiedIndex>::max();
+
 namespace {
 // StratifiedInfo Attribute things.
 typedef unsigned StratifiedAttr;
@@ -837,7 +840,8 @@ static void buildGraphFrom(CFLAliasAnalysis &Analysis, Function *Fn,
         auto From = findOrInsertNode(E.From);
         auto FlippedWeight = flipWeight(E.Weight);
         auto Attrs = E.AdditionalAttrs;
-        Graph.addEdge(From, To, {E.Weight, Attrs}, {FlippedWeight, Attrs});
+        Graph.addEdge(From, To, std::make_pair(E.Weight, Attrs),
+                                std::make_pair(FlippedWeight, Attrs));
       }
     }
   }
index 8a04bb302bff247b77bf54bb9687c3cac100a82e..d557bf7ae48575262b5668aab6ee4803edec2423 100644 (file)
@@ -54,8 +54,7 @@ struct StratifiedLink {
   // Optional<StratifiedIndex> because Optional<StratifiedIndex> would
   // eat up a considerable amount of extra memory, after struct
   // padding/alignment is taken into account.
-  static const auto SetSentinel =
-    std::numeric_limits<StratifiedIndex>::max();
+  static const StratifiedIndex SetSentinel;
 
   // \brief The index for the set "above" current
   StratifiedIndex Above;