void SlotCalculator::incorporateFunction(const Function *F) {
- assert((ModuleLevel.size() == 0 ||
+ assert((ModuleLevel.empty() ||
ModuleTypeLevel == 0) && "Module already incorporated!");
SC_DEBUG("begin processFunction!\n");
unsigned SlotNo = CompactionTypes.size();
SC_DEBUG("Inserting Compaction Type #" << SlotNo << ": " << *T << "\n");
CompactionTypes.push_back(T);
- CompactionTypeMap[T] = SlotNo;
+ CompactionTypeMap.insert(I, std::make_pair(T, SlotNo));
return SlotNo;
}
/// to determine if its actually empty.
bool SlotCalculator::CompactionTableIsEmpty() const {
// Check a degenerate case, just in case.
- if (CompactionTable.size() == 0)
+ if (CompactionTable.empty())
return true;
// Check each plane