[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReadConst.cpp ReaderInternals.h
Chris Lattner
lattner at cs.uiuc.edu
Thu Oct 2 15:27:00 PDT 2003
Changes in directory llvm/lib/Bytecode/Reader:
ReadConst.cpp updated: 1.53 -> 1.54
ReaderInternals.h updated: 1.44 -> 1.45
---
Log message:
There is no need for BytecodeParser to be an AbstractTypeUser. Instead, it
can just use PATypeHolders
---
Diffs of the changes:
Index: llvm/lib/Bytecode/Reader/ReadConst.cpp
diff -u llvm/lib/Bytecode/Reader/ReadConst.cpp:1.53 llvm/lib/Bytecode/Reader/ReadConst.cpp:1.54
--- llvm/lib/Bytecode/Reader/ReadConst.cpp:1.53 Mon Sep 22 18:38:23 2003
+++ llvm/lib/Bytecode/Reader/ReadConst.cpp Thu Oct 2 15:26:18 2003
@@ -94,25 +94,6 @@
}
}
-// refineAbstractType - The callback method is invoked when one of the
-// elements of TypeValues becomes more concrete...
-//
-void BytecodeParser::refineAbstractType(const DerivedType *OldType,
- const Type *NewType) {
- TypeValuesListTy::iterator I = find(FunctionTypeValues.begin(),
- FunctionTypeValues.end(), OldType);
- if (I == FunctionTypeValues.end()) {
- I = find(ModuleTypeValues.begin(), ModuleTypeValues.end(), OldType);
- assert(I != ModuleTypeValues.end() &&
- "Can't refine a type I don't know about!");
- }
-
- I->removeUserFromConcrete();
- *I = NewType; // Update to point to new, more refined type.
-}
-
-
-
// parseTypeConstants - We have to use this weird code to handle recursive
// types. We know that recursive types will only reference the current slab of
// values in the type plane, but they can forward reference types before they
@@ -132,7 +113,7 @@
// Insert a bunch of opaque types to be resolved later...
for (unsigned i = 0; i < NumEntries; ++i)
- Tab.push_back(PATypeHandle(OpaqueType::get(), this));
+ Tab.push_back(OpaqueType::get());
// Loop through reading all of the types. Forward types will make use of the
// opaque types just inserted.
Index: llvm/lib/Bytecode/Reader/ReaderInternals.h
diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.44 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.45
--- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.44 Tue Sep 23 11:17:50 2003
+++ llvm/lib/Bytecode/Reader/ReaderInternals.h Thu Oct 2 15:26:18 2003
@@ -43,7 +43,7 @@
unsigned FunctionSlot;
};
-class BytecodeParser : public AbstractTypeUser, public AbstractModuleProvider {
+class BytecodeParser : public AbstractModuleProvider {
BytecodeParser(const BytecodeParser &); // DO NOT IMPLEMENT
void operator=(const BytecodeParser &); // DO NOT IMPLEMENT
public:
@@ -116,7 +116,7 @@
// TypesLoaded - This vector mirrors the Values[TypeTyID] plane. It is used
// to deal with forward references to types.
//
- typedef std::vector<PATypeHandle> TypeValuesListTy;
+ typedef std::vector<PATypeHolder> TypeValuesListTy;
TypeValuesListTy ModuleTypeValues;
TypeValuesListTy FunctionTypeValues;
@@ -189,12 +189,6 @@
// resolve all references to the placeholder (if any) for the given value
void ResolveReferencesToValue(Value *Val, unsigned Slot);
-
-
- // refineAbstractType - The callback method is invoked when one of the
- // elements of TypeValues becomes more concrete...
- //
- virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
};
template<class SuperType>
More information about the llvm-commits
mailing list