From 4ba9aac839b06ff3d31ba80bcaca668ca7b39bb8 Mon Sep 17 00:00:00 2001 From: Nuno Lopes Date: Thu, 27 Nov 2008 16:37:02 +0000 Subject: 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 --- lib/Support/Annotation.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'lib/Support/Annotation.cpp') 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 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. -- cgit v1.2.3-18-g5258