[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadConst.cpp ReadInst.cpp ReaderInternals.h
John Criswell
criswell at choi.cs.uiuc.edu
Thu Jun 26 16:42:56 PDT 2003
Changes in directory llvm/lib/Bytecode/Reader:
ReadConst.cpp updated: 1.46 -> 1.46.2.1
ReadInst.cpp updated: 1.42 -> 1.42.2.1
ReaderInternals.h updated: 1.37 -> 1.37.2.1
---
Log message:
Merged with mainline on Thursday, June 26, 2003.
---
Diffs of the changes:
Index: llvm/lib/Bytecode/Reader/ReadConst.cpp
diff -u llvm/lib/Bytecode/Reader/ReadConst.cpp:1.46 llvm/lib/Bytecode/Reader/ReadConst.cpp:1.46.2.1
--- llvm/lib/Bytecode/Reader/ReadConst.cpp:1.46 Thu May 22 13:08:30 2003
+++ llvm/lib/Bytecode/Reader/ReadConst.cpp Thu Jun 26 16:35:14 2003
@@ -139,7 +139,7 @@
// Insert a bunch of opaque types to be resolved later...
for (unsigned i = 0; i < NumEntries; ++i)
- Tab.push_back(PATypeHandle<Type>(OpaqueType::get(), this));
+ Tab.push_back(PATypeHandle(OpaqueType::get(), this));
// Loop through reading all of the types. Forward types will make use of the
// opaque types just inserted.
Index: llvm/lib/Bytecode/Reader/ReadInst.cpp
diff -u llvm/lib/Bytecode/Reader/ReadInst.cpp:1.42 llvm/lib/Bytecode/Reader/ReadInst.cpp:1.42.2.1
--- llvm/lib/Bytecode/Reader/ReadInst.cpp:1.42 Thu May 22 13:08:30 2003
+++ llvm/lib/Bytecode/Reader/ReadInst.cpp Thu Jun 26 16:35:14 2003
@@ -302,16 +302,19 @@
if (Raw.NumOperands < 3) return true;
Normal = cast<BasicBlock>(getValue(Type::LabelTy, Raw.Arg2));
- Except = cast<BasicBlock>(getValue(Type::LabelTy, args[0]));
+ if (Raw.NumOperands == 3)
+ Except = cast<BasicBlock>(getValue(Type::LabelTy, Raw.Arg3));
+ else {
+ Except = cast<BasicBlock>(getValue(Type::LabelTy, args[0]));
- FunctionType::ParamTypes::const_iterator It = PL.begin();
- for (unsigned i = 1; i < args.size(); i++) {
- if (It == PL.end()) return true;
- // TODO: Check getValue for null!
- Params.push_back(getValue(*It++, args[i]));
+ FunctionType::ParamTypes::const_iterator It = PL.begin();
+ for (unsigned i = 1; i < args.size(); i++) {
+ if (It == PL.end()) return true;
+ // TODO: Check getValue for null!
+ Params.push_back(getValue(*It++, args[i]));
+ }
+ if (It != PL.end()) return true;
}
-
- if (It != PL.end()) return true;
} else {
if (args.size() < 4) return true;
@@ -326,7 +329,8 @@
}
}
- delete Raw.VarArgs;
+ if (Raw.NumOperands > 3)
+ delete Raw.VarArgs;
Res = new InvokeInst(M, Normal, Except, Params);
return false;
}
Index: llvm/lib/Bytecode/Reader/ReaderInternals.h
diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.37 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.37.2.1
--- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.37 Thu May 22 13:26:48 2003
+++ llvm/lib/Bytecode/Reader/ReaderInternals.h Thu Jun 26 16:35:14 2003
@@ -104,7 +104,7 @@
// TypesLoaded - This vector mirrors the Values[TypeTyID] plane. It is used
// to deal with forward references to types.
//
- typedef std::vector<PATypeHandle<Type> > TypeValuesListTy;
+ typedef std::vector<PATypeHandle> TypeValuesListTy;
TypeValuesListTy ModuleTypeValues;
TypeValuesListTy FunctionTypeValues;
More information about the llvm-commits
mailing list