#include <map>
#include "llvm/Annotation.h"
+using std::string;
+using std::map;
+using std::pair;
+using std::make_pair;
typedef map<const string, unsigned> IDMapType;
static unsigned IDCounter = 0; // Unique ID counter
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) {
+ 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.
//