diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-09 21:00:23 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-09 21:00:23 +0000 |
commit | 78914e772f4988dd5e521b49e2e9b208fa1b02ab (patch) | |
tree | 9d50b707244312bad2e6567df1095d1ebc2db2aa /include/Support/Annotation.h | |
parent | bf2f0436595602fcc81ef8c644157417db43e1d7 (diff) | |
download | external_llvm-78914e772f4988dd5e521b49e2e9b208fa1b02ab.zip external_llvm-78914e772f4988dd5e521b49e2e9b208fa1b02ab.tar.gz external_llvm-78914e772f4988dd5e521b49e2e9b208fa1b02ab.tar.bz2 |
Convert ConstRules to use annotations to clean it up.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@514 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/Support/Annotation.h')
-rw-r--r-- | include/Support/Annotation.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/include/Support/Annotation.h b/include/Support/Annotation.h index 43a379e..9919732 100644 --- a/include/Support/Annotation.h +++ b/include/Support/Annotation.h @@ -161,12 +161,17 @@ public: // register an annotation handler // struct AnnotationManager { + typedef Annotation *(*Factory)(AnnotationID, const Annotable *, void*); + //===--------------------------------------------------------------------===// // Basic ID <-> Name map functionality static AnnotationID getID (const string &Name); // Name -> ID static const string &getName(AnnotationID ID); // ID -> Name + // getID - Name -> ID + registration of a factory function for demand driven + // annotation support. + static AnnotationID getID (const string &Name, Factory Fact, void *Data=0); //===--------------------------------------------------------------------===// // Annotation creation on demand support... @@ -175,8 +180,7 @@ struct AnnotationManager { // function used to create an annotation on demand if it is needed by the // Annotable::getOrCreateAnnotation method. // - static void registerAnnotationFactory(AnnotationID ID, - Annotation *(*Func)(AnnotationID, const Annotable *, void *), + static void registerAnnotationFactory(AnnotationID ID, Factory Func, void *ExtraData = 0); // createAnnotation - Create an annotation of the specified ID for the |