[llvm-commits] CVS: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
Chris Lattner
sabre at nondot.org
Fri Jan 12 15:23:24 PST 2007
Changes in directory llvm/lib/Bytecode/Writer:
SlotCalculator.cpp updated: 1.79 -> 1.80
---
Log message:
Eliminate a log(n) lookup
---
Diffs of the changes: (+3 -3)
SlotCalculator.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Bytecode/Writer/SlotCalculator.cpp
diff -u llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.79 llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.80
--- llvm/lib/Bytecode/Writer/SlotCalculator.cpp:1.79 Fri Jan 12 01:05:13 2007
+++ llvm/lib/Bytecode/Writer/SlotCalculator.cpp Fri Jan 12 17:23:08 2007
@@ -279,7 +279,7 @@
void SlotCalculator::incorporateFunction(const Function *F) {
- assert((ModuleLevel.size() == 0 ||
+ assert((ModuleLevel.empty() ||
ModuleTypeLevel == 0) && "Module already incorporated!");
SC_DEBUG("begin processFunction!\n");
@@ -442,7 +442,7 @@
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;
}
@@ -639,7 +639,7 @@
/// 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
More information about the llvm-commits
mailing list