aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/Annotation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Support/Annotation.cpp')
-rw-r--r--lib/Support/Annotation.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp
index 38b0607086..0e208e08ba 100644
--- a/lib/Support/Annotation.cpp
+++ b/lib/Support/Annotation.cpp
@@ -27,7 +27,16 @@ Annotable::~Annotable() { // Virtual because it's designed to be subclassed...
}
}
-typedef std::map<const char*, unsigned> IDMapType;
+namespace {
+ class StrCmp {
+ public:
+ bool operator()(const char *a, const char *b) {
+ return strcmp(a, b) < 0;
+ }
+ };
+}
+
+typedef std::map<const char*, unsigned, StrCmp> IDMapType;
static unsigned IDCounter = 0; // Unique ID counter
// Static member to ensure initialiation on demand.