Clean up Type class by removing mutable ConstRules member and use annotations insead
llvm-svn: 516
diff --git a/llvm/lib/Support/Annotation.cpp b/llvm/lib/Support/Annotation.cpp
index fabf34b..65a049d 100644
--- a/llvm/lib/Support/Annotation.cpp
+++ b/llvm/lib/Support/Annotation.cpp
@@ -28,6 +28,16 @@
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.
//