[ADT] Teach DenseMap to support StringRef keys.
authorChandler Carruth <chandlerc@gmail.com>
Wed, 24 Jun 2015 10:06:29 +0000 (10:06 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Wed, 24 Jun 2015 10:06:29 +0000 (10:06 +0000)
commit9ece8eb9456421244dbf894676848574f21b401f
tree706f883670875fb3bef973a77b21eb952933fd34
parent0b48c1e633a249b150f059b18cc478f6307a01f7
[ADT] Teach DenseMap to support StringRef keys.

While often you want to use something specialized like StringMap, when
the strings already have persistent storage a normal densemap over them
can be more efficient.

This can't go into StringRef.h because of really obnoxious header chains
from the hashing code to the endian detection code to CPU feature
detection code to StringMap.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@240528 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/ADT/DenseMapInfo.h
unittests/ADT/DenseMapTest.cpp