[llvm-commits] CVS: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
Chris Lattner
sabre at nondot.org
Thu May 3 15:10:12 PDT 2007
Changes in directory llvm/lib/Bitcode/Reader:
BitcodeReader.cpp updated: 1.26 -> 1.27
---
Log message:
bug fixes
---
Diffs of the changes: (+3 -3)
BitcodeReader.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff -u llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.26 llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.27
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp:1.26 Thu May 3 17:04:19 2007
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp Thu May 3 17:09:51 2007
@@ -400,7 +400,7 @@
switch (Stream.ReadRecord(Code, Record)) {
default: // Default behavior: unknown type.
break;
- case bitc::TST_CODE_ENTRY: // VST_ENTRY: [valueid, namelen, namechar x N]
+ case bitc::VST_CODE_ENTRY: // VST_ENTRY: [valueid, namelen, namechar x N]
if (ConvertToString(Record, 1, ValueName))
return Error("Invalid TST_ENTRY record");
unsigned ValueID = Record[0];
@@ -1054,7 +1054,7 @@
if (Record.size() < 1 || Record[0] == 0)
return Error("Invalid DECLAREBLOCKS record");
// Create all the basic blocks for the function.
- FunctionBBs.resize(Record.size());
+ FunctionBBs.resize(Record[0]);
for (unsigned i = 0, e = FunctionBBs.size(); i != e; ++i)
FunctionBBs[i] = new BasicBlock("", F);
CurBB = FunctionBBs[0];
@@ -1185,7 +1185,7 @@
}
return Error("Invalid RET record");
case bitc::FUNC_CODE_INST_BR: { // BR: [bb#, bb#, opval] or [bb#]
- if (Record.size() != 1 || Record.size() != 3)
+ if (Record.size() != 1 && Record.size() != 3)
return Error("Invalid BR record");
BasicBlock *TrueDest = getBasicBlock(Record[0]);
if (TrueDest == 0)
More information about the llvm-commits
mailing list