mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Clean up Type class by removing mutable ConstRules member and use annotations insead
llvm-svn: 516
This commit is contained in:
parent
91858f96f2
commit
45768e6fe5
@ -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.
|
||||
//
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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.
|
||||
//
|
||||
|
Loading…
Reference in New Issue
Block a user