summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2001-09-07 16:44:01 +0000
committerChris Lattner <sabre@nondot.org>2001-09-07 16:44:01 +0000
commitda010ca1b977d7508736d37f0eba9a16dc43b679 (patch)
tree469a9985b25e78fa69e54b4a3b7f33d808efdfad
parentd707ec62b613d8dc5cc17c495eff8038418008ff (diff)
downloadbcm5719-llvm-da010ca1b977d7508736d37f0eba9a16dc43b679.tar.gz
bcm5719-llvm-da010ca1b977d7508736d37f0eba9a16dc43b679.zip
Annotations are const objects now
llvm-svn: 458
-rw-r--r--llvm/lib/Support/Annotation.cpp4
-rw-r--r--llvm/support/lib/Support/Annotation.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Support/Annotation.cpp b/llvm/lib/Support/Annotation.cpp
index e9866207894..fabf34b2db7 100644
--- a/llvm/lib/Support/Annotation.cpp
+++ b/llvm/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);
diff --git a/llvm/support/lib/Support/Annotation.cpp b/llvm/support/lib/Support/Annotation.cpp
index e9866207894..fabf34b2db7 100644
--- a/llvm/support/lib/Support/Annotation.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud