diff --git a/lib/Transforms/Scalar/DCE.cpp b/lib/Transforms/Scalar/DCE.cpp index f1582d3346b..56a6d1e822d 100644 --- a/lib/Transforms/Scalar/DCE.cpp +++ b/lib/Transforms/Scalar/DCE.cpp @@ -53,14 +53,13 @@ struct BasicBlockDCE { }; -template -static bool RemoveUnusedDefs(ValueHolder &Vals, - DCEController DCEControl) { +template +static bool RemoveUnusedDefs(Container &Vals, DCEController DCEControl) { bool Changed = false; - typedef ValueHolder Container; - int Offset = DCEController::EndOffs; - for (Container::iterator DI = Vals.begin(); DI != Vals.end()-Offset; ) { + + for (typename Container::iterator DI = Vals.begin(); + DI != Vals.end()-Offset; ) { // Look for un"used" definitions... if ((*DI)->use_empty() && DCEController::isDCEable(*DI)) { // Bye bye