summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/Annotation.cpp
diff options
context:
space:
mode:
authorNuno Lopes <nunoplopes@sapo.pt>2008-11-27 16:37:02 +0000
committerNuno Lopes <nunoplopes@sapo.pt>2008-11-27 16:37:02 +0000
commitd5c2a144e193f3439a92822806fb75055377bfed (patch)
treea8250daae259855c6de10b903ecf6d74be59252e /llvm/lib/Support/Annotation.cpp
parente0d019def6413f61ccc1cdc9bbe55773015b7a40 (diff)
downloadbcm5719-llvm-d5c2a144e193f3439a92822806fb75055377bfed.tar.gz
bcm5719-llvm-d5c2a144e193f3439a92822806fb75055377bfed.zip
fix my previous commit r60064: compare strings instead of pointers
llvm-svn: 60174
Diffstat (limited to 'llvm/lib/Support/Annotation.cpp')
-rw-r--r--llvm/lib/Support/Annotation.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/lib/Support/Annotation.cpp b/llvm/lib/Support/Annotation.cpp
index 38b06070867..0e208e08ba0 100644
--- a/llvm/lib/Support/Annotation.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud