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 | d5c2a144e193f3439a92822806fb75055377bfed (patch) | |
tree | a8250daae259855c6de10b903ecf6d74be59252e /llvm/lib/Support/Annotation.cpp | |
parent | e0d019def6413f61ccc1cdc9bbe55773015b7a40 (diff) | |
download | bcm5719-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.cpp | 11 |
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. |