1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Annotations are const objects now

llvm-svn: 458
This commit is contained in:
Chris Lattner 2001-09-07 16:44:01 +00:00
parent e299925703
commit 99e8b0589f
2 changed files with 4 additions and 4 deletions

View File

@ -14,7 +14,7 @@ static unsigned IDCounter = 0; // Unique ID counter
static IDMapType &getIDMap() { static IDMapType TheMap; return TheMap; }
// On demand annotation creation support...
typedef Annotation *(*AnnFactory)(AnnotationID, Annotable *, void *);
typedef Annotation *(*AnnFactory)(AnnotationID, const Annotable *, void *);
typedef map<unsigned, pair<AnnFactory,void*> > FactMapType;
static FactMapType &getFactMap() { static FactMapType FactMap; return FactMap; }
@ -57,7 +57,7 @@ void AnnotationManager::registerAnnotationFactory(AnnotationID ID,
// specified object, using a register annotation creation function.
//
Annotation *AnnotationManager::createAnnotation(AnnotationID ID,
Annotable *Obj) {
const Annotable *Obj) {
FactMapType::iterator I = getFactMap().find(ID.ID);
if (I == getFactMap().end()) return 0;
return I->second.first(ID, Obj, I->second.second);

View File

@ -14,7 +14,7 @@ static unsigned IDCounter = 0; // Unique ID counter
static IDMapType &getIDMap() { static IDMapType TheMap; return TheMap; }
// On demand annotation creation support...
typedef Annotation *(*AnnFactory)(AnnotationID, Annotable *, void *);
typedef Annotation *(*AnnFactory)(AnnotationID, const Annotable *, void *);
typedef map<unsigned, pair<AnnFactory,void*> > FactMapType;
static FactMapType &getFactMap() { static FactMapType FactMap; return FactMap; }
@ -57,7 +57,7 @@ void AnnotationManager::registerAnnotationFactory(AnnotationID ID,
// specified object, using a register annotation creation function.
//
Annotation *AnnotationManager::createAnnotation(AnnotationID ID,
Annotable *Obj) {
const Annotable *Obj) {
FactMapType::iterator I = getFactMap().find(ID.ID);
if (I == getFactMap().end()) return 0;
return I->second.first(ID, Obj, I->second.second);