> URL: http://llvm.org/viewvc/llvm-project?rev=46625&view=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 find(key_start, key_start + Key.size());
> + }
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);
etc.
>
-Chris
_______________________________________________
llvm-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits