[llvm-commits] CVS: llvm/lib/Bytecode/Reader/Reader.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 20 11:07:01 PST 2004
Changes in directory llvm/lib/Bytecode/Reader:
Reader.cpp updated: 1.101 -> 1.102
---
Log message:
Fix bogus warning and simplify code
---
Diffs of the changes: (+5 -11)
Index: llvm/lib/Bytecode/Reader/Reader.cpp
diff -u llvm/lib/Bytecode/Reader/Reader.cpp:1.101 llvm/lib/Bytecode/Reader/Reader.cpp:1.102
--- llvm/lib/Bytecode/Reader/Reader.cpp:1.101 Mon Jan 19 18:54:04 2004
+++ llvm/lib/Bytecode/Reader/Reader.cpp Tue Jan 20 11:06:29 2004
@@ -509,21 +509,15 @@
const unsigned char *End) {
while (Buf != End) {
- unsigned NumEntries;
+ unsigned NumEntries = read_vbr_uint(Buf, End);
unsigned Ty;
- NumEntries = read_vbr_uint(Buf, End);
- switch (NumEntries & 3) {
- case 0:
- case 1:
- case 2:
- Ty = NumEntries >> 2;
- NumEntries &= 3;
- break;
- case 3:
+ if ((NumEntries & 3) == 3) {
NumEntries >>= 2;
Ty = read_vbr_uint(Buf, End);
- break;
+ } else {
+ Ty = NumEntries >> 2;
+ NumEntries &= 3;
}
if (Ty >= CompactionTable.size())
More information about the llvm-commits
mailing list