diff options
author | Chris Lattner <sabre@nondot.org> | 2002-10-14 03:34:17 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-10-14 03:34:17 +0000 |
commit | ca1725d3c8f710552da8533a3cef788ecbfab34c (patch) | |
tree | c52e30afc9051e2d52b32ec4512629dab6acbfbc /llvm/lib/Bytecode/Writer | |
parent | 2862d2ec711cb77a954f313f11e280280691c895 (diff) | |
download | bcm5719-llvm-ca1725d3c8f710552da8533a3cef788ecbfab34c.tar.gz bcm5719-llvm-ca1725d3c8f710552da8533a3cef788ecbfab34c.zip |
Clean up code a bit, no functionality changes.
llvm-svn: 4162
Diffstat (limited to 'llvm/lib/Bytecode/Writer')
-rw-r--r-- | llvm/lib/Bytecode/Writer/Writer.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/llvm/lib/Bytecode/Writer/Writer.cpp b/llvm/lib/Bytecode/Writer/Writer.cpp index 012f9bc8c7a..e85498ce5fd 100644 --- a/llvm/lib/Bytecode/Writer/Writer.cpp +++ b/llvm/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 + } } } |