From: Nuno Lopes Date: Thu, 27 Nov 2008 16:37:02 +0000 (+0000) Subject: fix my previous commit r60064: compare strings instead of pointers X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4ba9aac839b06ff3d31ba80bcaca668ca7b39bb8;p=oota-llvm.git 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 --- diff --git a/lib/Support/Annotation.cpp b/lib/Support/Annotation.cpp index 38b06070867..0e208e08ba0 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 IDMapType; +namespace { + class StrCmp { + public: + bool operator()(const char *a, const char *b) { + return strcmp(a, b) < 0; + } + }; +} + +typedef std::map IDMapType; static unsigned IDCounter = 0; // Unique ID counter // Static member to ensure initialiation on demand.