[llvm-commits] CVS: llvm/lib/Support/Annotation.cpp
Misha Brukman
brukman at cs.uiuc.edu
Mon Nov 8 20:27:30 PST 2004
Changes in directory llvm/lib/Support:
Annotation.cpp updated: 1.15 -> 1.16
---
Log message:
* Convert tabs to spaces
* Order #includes according to style guide
* Remove extraneous blank lines
---
Diffs of the changes: (+6 -10)
Index: llvm/lib/Support/Annotation.cpp
diff -u llvm/lib/Support/Annotation.cpp:1.15 llvm/lib/Support/Annotation.cpp:1.16
--- llvm/lib/Support/Annotation.cpp:1.15 Wed Sep 1 17:55:35 2004
+++ llvm/lib/Support/Annotation.cpp Mon Nov 8 22:27:19 2004
@@ -11,8 +11,8 @@
//
//===----------------------------------------------------------------------===//
-#include <map>
#include "llvm/Support/Annotation.h"
+#include <map>
using namespace llvm;
Annotation::~Annotation() {} // Designed to be subclassed
@@ -26,7 +26,6 @@
}
}
-
typedef std::map<const std::string, unsigned> IDMapType;
static unsigned IDCounter = 0; // Unique ID counter
@@ -65,13 +64,12 @@
// getID - Name -> ID + registration of a factory function for demand driven
// annotation support.
AnnotationID AnnotationManager::getID(const std::string &Name, Factory Fact,
- void *Data) {
+ void *Data) {
AnnotationID Result(getID(Name));
registerAnnotationFactory(Result, Fact, Data);
- return Result;
+ return Result;
}
-
// getName - This function is especially slow, but that's okay because it should
// only be used for debugging.
//
@@ -83,14 +81,12 @@
}
}
-
// registerAnnotationFactory - This method is used to register a callback
// function used to create an annotation on demand if it is needed by the
// Annotable::findOrCreateAnnotation method.
//
-void AnnotationManager::registerAnnotationFactory(AnnotationID ID,
- AnnFactory F,
- void *ExtraData) {
+void AnnotationManager::registerAnnotationFactory(AnnotationID ID, AnnFactory F,
+ void *ExtraData) {
if (F)
getFactMap()[ID.ID] = std::make_pair(F, ExtraData);
else
@@ -101,7 +97,7 @@
// specified object, using a register annotation creation function.
//
Annotation *AnnotationManager::createAnnotation(AnnotationID ID,
- const 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);
More information about the llvm-commits
mailing list