BFI: Add constructor for Weight
[oota-llvm.git] / lib / Analysis / BlockFrequencyInfoImpl.cpp
index 44b4192353a5b46d65d840d84eda8cae6924cd90..3203c371648d79822a56e192cc3572f85ef8469d 100644 (file)
@@ -112,11 +112,7 @@ void Distribution::add(const BlockNode &Node, uint64_t Amount,
   Total = NewTotal;
 
   // Save the weight.
-  Weight W;
-  W.TargetNode = Node;
-  W.Amount = Amount;
-  W.Type = Type;
-  Weights.push_back(W);
+  Weights.push_back(Weight(Type, Node, Amount));
 }
 
 static void combineWeight(Weight &W, const Weight &OtherW) {