[llvm-commits] CVS: llvm/lib/Bytecode/Writer/Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Oct 13 22:35:00 PDT 2002
Changes in directory llvm/lib/Bytecode/Writer:
Writer.cpp updated: 1.28 -> 1.29
---
Log message:
Clean up code a bit, no functionality changes.
---
Diffs of the changes:
Index: llvm/lib/Bytecode/Writer/Writer.cpp
diff -u llvm/lib/Bytecode/Writer/Writer.cpp:1.28 llvm/lib/Bytecode/Writer/Writer.cpp:1.29
--- llvm/lib/Bytecode/Writer/Writer.cpp:1.28 Tue Oct 1 17:38:32 2002
+++ llvm/lib/Bytecode/Writer/Writer.cpp Sun Oct 13 22:34:17 2002
@@ -120,17 +120,17 @@
outputConstantsInPlane(Plane, ValNo); // Write out the types
}
- for (unsigned pno = 0; pno < NumPlanes; pno++) {
+ for (unsigned pno = 0; pno != NumPlanes; pno++) {
const std::vector<const Value*> &Plane = Table.getPlane(pno);
- if (Plane.empty()) continue; // Skip empty type planes...
-
- unsigned ValNo = 0;
- if (isFunction) // Don't reemit module constants
- ValNo = Table.getModuleLevel(pno);
- else if (pno == Type::TypeTyID)
- continue; // Type plane was written out above
-
- outputConstantsInPlane(Plane, ValNo); // Write out constants in the plane
+ if (!Plane.empty()) { // Skip empty type planes...
+ unsigned ValNo = 0;
+ if (isFunction) // Don't reemit module constants
+ ValNo = Table.getModuleLevel(pno);
+ else if (pno == Type::TypeTyID) // If type plane wasn't written out above
+ continue;
+
+ outputConstantsInPlane(Plane, ValNo); // Write out constants in the plane
+ }
}
}
More information about the llvm-commits
mailing list