URL: http://llvm.org/viewvc/llvm-project?rev=46625view=rev
Log:
Add convenient std::string helpers to StringMap. Patch by Mikhail
Glushenkov!
Cool. Before David chimes in :) , I'll point out:
+ iterator find(const std::string Key) {
+const char* key_start = Key[0];
+return
Hello, Chris
This sort of thing won't work when the string is empty and checking is
enabled. Maybe something like this is enough:
if (Key.empty()) return find(0,0);
Will find() operate sane in such case (supplying NULL pointer as input)?
--
With best regards, Anton Korobeynikov.
Author: asl
Date: Thu Jan 31 17:02:33 2008
New Revision: 46625
URL: http://llvm.org/viewvc/llvm-project?rev=46625view=rev
Log:
Add convenient std::string helpers to StringMap. Patch by Mikhail Glushenkov!
Modified:
llvm/trunk/include/llvm/ADT/StringMap.h
Modified:
On Jan 31, 2008, at 3:32 PM, Anton Korobeynikov wrote:
Hello, Chris
This sort of thing won't work when the string is empty and checking
is
enabled. Maybe something like this is enough:
if (Key.empty()) return find(0,0);
Will find() operate sane in such case (supplying NULL pointer as