Now that we have C++11, turn simple functors into lambdas and remove a ton of boilerplate.

No intended functionality change.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202588 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer
2014-03-01 11:47:00 +00:00
parent 73bbab9d75
commit ee5e607355
20 changed files with 114 additions and 312 deletions

View File

@ -1547,19 +1547,6 @@ Value *Reassociate::OptimizeAdd(Instruction *I,
return 0;
}
namespace {
/// \brief Predicate tests whether a ValueEntry's op is in a map.
struct IsValueInMap {
const DenseMap<Value *, unsigned> &Map;
IsValueInMap(const DenseMap<Value *, unsigned> &Map) : Map(Map) {}
bool operator()(const ValueEntry &Entry) {
return Map.find(Entry.Op) != Map.end();
}
};
}
/// \brief Build up a vector of value/power pairs factoring a product.
///
/// Given a series of multiplication operands, build a vector of factors and