diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:44:01 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-07 16:44:01 +0000 |
commit | c0f483d4ef432b42f6996dc46edddef46367ad20 (patch) | |
tree | 56f551c62941bf4de87f8cbf75aae44096f863bc /support/lib | |
parent | 13b1f0cb4b7bfa84602b99d1d315e400f3dbd8c1 (diff) | |
download | external_llvm-c0f483d4ef432b42f6996dc46edddef46367ad20.zip external_llvm-c0f483d4ef432b42f6996dc46edddef46367ad20.tar.gz external_llvm-c0f483d4ef432b42f6996dc46edddef46367ad20.tar.bz2 |
Annotations are const objects now
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@458 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'support/lib')
-rw-r--r-- | support/lib/Support/Annotation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/support/lib/Support/Annotation.cpp b/support/lib/Support/Annotation.cpp index e986620..fabf34b 100644 --- a/support/lib/Support/Annotation.cpp +++ b/support/lib/Support/Annotation.cpp @@ -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); |