diff options
author | Nuno Lopes <nunoplopes@sapo.pt> | 2008-11-27 16:37:02 +0000 |
---|---|---|
committer | Nuno Lopes <nunoplopes@sapo.pt> | 2008-11-27 16:37:02 +0000 |
commit | 4ba9aac839b06ff3d31ba80bcaca668ca7b39bb8 (patch) | |
tree | fb7e3fa50db8737d6664ef5d55e6dd60a4a6248a /lib/Support | |
parent | 4aebaee0e40f2457f1a6588679655a3c600a553b (diff) |
fix my previous commit r60064: compare strings instead of pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60174 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r-- | lib/Support/Annotation.cpp | 11 |
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. |