projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4aebaee
)
fix my previous commit r60064: compare strings instead of pointers
author
Nuno Lopes
<nunoplopes@sapo.pt>
Thu, 27 Nov 2008 16:37:02 +0000
(16:37 +0000)
committer
Nuno Lopes
<nunoplopes@sapo.pt>
Thu, 27 Nov 2008 16:37:02 +0000
(16:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60174
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Support/Annotation.cpp
patch
|
blob
|
history
diff --git
a/lib/Support/Annotation.cpp
b/lib/Support/Annotation.cpp
index 38b0607086747bc58da049ebf1580841d57c9b8f..0e208e08ba02d05a8a42f81676c69ed447340b75 100644
(file)
--- 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.