Teach map/unordered_map how to optimize 'emplace(Key, T)'.

In cases where emplace is called with two arguments and the first one
matches the key_type we can Key to check for duplicates before allocating.

This patch expands on work done by dexonsmith@apple.com.


git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@266498 91177308-0d34-0410-b5e6-96231b3b80d8
7 files changed