aboutsummaryrefslogtreecommitdiff
path: root/lib/Bytecode
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-10-14 03:34:17 +0000
committerChris Lattner <sabre@nondot.org>2002-10-14 03:34:17 +0000
commit6463e0df859c2ec521cac2a586b6b693b8f769fd (patch)
treeb52d1f8be528d706241874c85ec9a0b8f4124d27 /lib/Bytecode
parentbbd4b303e3792d94239640a1075b66dedeaa37fe (diff)
Clean up code a bit, no functionality changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4162 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bytecode')
-rw-r--r--lib/Bytecode/Writer/Writer.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/Bytecode/Writer/Writer.cpp b/lib/Bytecode/Writer/Writer.cpp
index 012f9bc8c7..e85498ce5f 100644
--- a/lib/Bytecode/Writer/Writer.cpp
+++ b/lib/Bytecode/Writer/Writer.cpp
@@ -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
+ }
}
}