#include <algorithm>
using namespace llvm;
-static bool isFirstClassType(const std::pair<const llvm::Type*,
- unsigned int> &P) {
- return P.first->isFirstClassType();
+static bool isSingleValueType(const std::pair<const llvm::Type*,
+ unsigned int> &P) {
+ return P.first->isSingleValueType();
}
static bool isIntegerValue(const std::pair<const Value*, unsigned> &V) {
// in the table (have low bit-width).
std::stable_sort(Types.begin(), Types.end(), CompareByFrequency);
- // Partition the Type ID's so that the first-class types occur before the
+ // Partition the Type ID's so that the single-value types occur before the
// aggregate types. This allows the aggregate types to be dropped from the
// type table after parsing the global variable initializers.
- std::partition(Types.begin(), Types.end(), isFirstClassType);
+ std::partition(Types.begin(), Types.end(), isSingleValueType);
// Now that we rearranged the type table, rebuild TypeMap.
for (unsigned i = 0, e = Types.size(); i != e; ++i)
/// there are none, return -1.
int ValueEnumerator::PurgeAggregateValues() {
// If there are no aggregate values at the end of the list, return -1.
- if (Values.empty() || Values.back().first->getType()->isFirstClassType())
+ if (Values.empty() || Values.back().first->getType()->isSingleValueType())
return -1;
// Otherwise, remove aggregate values...
- while (!Values.empty() && !Values.back().first->getType()->isFirstClassType())
+ while (!Values.empty() && !Values.back().first->getType()->isSingleValueType())
Values.pop_back();
// ... and return the new size.