Clean up Type class by removing mutable ConstRules member and use annotations insead

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@516 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2001-09-09 21:02:38 +00:00
parent 14712a6abf
commit 82072d4743
3 changed files with 20 additions and 1 deletions

View File

@ -28,6 +28,16 @@ AnnotationID AnnotationManager::getID(const string &Name) { // Name -> ID
return I->second;
}
// getID - Name -> ID + registration of a factory function for demand driven
// annotation support.
AnnotationID AnnotationManager::getID(const string &Name, Factory Fact,
void *Data=0) {
AnnotationID Result(getID(Name));
registerAnnotationFactory(Result, Fact, Data);
return Result;
}
// getName - This function is especially slow, but that's okay because it should
// only be used for debugging.
//

View File

@ -29,7 +29,6 @@ Type::Type(const string &name, PrimitiveID id)
setDescription(name);
ID = id;
Abstract = false;
ConstRulesImpl = 0;
UID = CurUID++; // Assign types UID's as they are created
UIDMappings.push_back(this);
}

View File

@ -28,6 +28,16 @@ AnnotationID AnnotationManager::getID(const string &Name) { // Name -> ID
return I->second;
}
// getID - Name -> ID + registration of a factory function for demand driven
// annotation support.
AnnotationID AnnotationManager::getID(const string &Name, Factory Fact,
void *Data=0) {
AnnotationID Result(getID(Name));
registerAnnotationFactory(Result, Fact, Data);
return Result;
}
// getName - This function is especially slow, but that's okay because it should
// only be used for debugging.
//