Clean up code a bit, no functionality changes.
authorChris Lattner <sabre@nondot.org>
Mon, 14 Oct 2002 03:34:17 +0000 (03:34 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 14 Oct 2002 03:34:17 +0000 (03:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4162 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Bytecode/Writer/Writer.cpp

index 012f9bc8c7ab534ed880282df51053c13f5c5667..e85498ce5fd12c6ad7b618999841c43f485a79cf 100644 (file)
@@ -120,17 +120,17 @@ void BytecodeWriter::outputConstants(bool isFunction) {
     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
+    }
   }
 }