[llvm-commits] [llvm] r136481 - in /llvm/trunk: include/llvm/ADT/StringExtras.h utils/TableGen/Record.cpp
David A. Greene
greened at obbligato.org
Fri Jul 29 13:48:42 PDT 2011
Chris Lattner <clattner at apple.com> writes:
> On Jul 29, 2011, at 12:06 PM, David Greene wrote:
>> Create a std::string wrapper for use as a DenseMap key. DenseMap is
>> not safe in generate with strings, so this wrapper indicates that only
>> strings guaranteed not to have certain values should be used in the
>> DenseMap.
>
> This is fine with me in principle, but out of curiosity, why use
> DenseMap<string, x> instead of StringMap<x>? The later doesn't need
> this and is *much* more efficient.
This isn't a DenseMap<string, x>. It's a
DenseMap<StructTypeThatIncludesAString, x>.
-Dave
More information about the llvm-commits
mailing list