Convert code to compile with vc7.1.

Patch contributed by Paolo Invernizzi. Thanks Paolo!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16368 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer
2004-09-15 17:06:42 +00:00
parent 7e0e9c635f
commit 2da5c3dda6
16 changed files with 74 additions and 58 deletions
+3 -3
View File
@@ -347,14 +347,14 @@ unsigned BytecodeReader::getTypeSlot(const Type *Ty) {
}
// Check the function level types first...
TypeListTy::iterator I = find(FunctionTypes.begin(), FunctionTypes.end(), Ty);
TypeListTy::iterator I = std::find(FunctionTypes.begin(), FunctionTypes.end(), Ty);
if (I != FunctionTypes.end())
return Type::FirstDerivedTyID + ModuleTypes.size() +
(&*I - &FunctionTypes[0]);
// Check the module level types now...
I = find(ModuleTypes.begin(), ModuleTypes.end(), Ty);
I = std::find(ModuleTypes.begin(), ModuleTypes.end(), Ty);
if (I == ModuleTypes.end())
error("Didn't find type in ModuleTypes.");
return Type::FirstDerivedTyID + (&*I - &ModuleTypes[0]);
@@ -381,7 +381,7 @@ const Type *BytecodeReader::getGlobalTableType(unsigned Slot) {
unsigned BytecodeReader::getGlobalTableTypeSlot(const Type *Ty) {
if (Ty->isPrimitiveType())
return Ty->getTypeID();
TypeListTy::iterator I = find(ModuleTypes.begin(),
TypeListTy::iterator I = std::find(ModuleTypes.begin(),
ModuleTypes.end(), Ty);
if (I == ModuleTypes.end())
error("Didn't find type in ModuleTypes.");