commit | 1a324fd49a1d91430624dae5bb1c86de269daef6 | [log] [tgz] |
---|---|---|
author | Benjamin Kramer <benny.kra@googlemail.com> | Thu Jul 21 13:37:53 2016 +0000 |
committer | Benjamin Kramer <benny.kra@googlemail.com> | Thu Jul 21 13:37:53 2016 +0000 |
tree | 8ad6abfb82d3036c54eff9b6eb2c9a3be848db0e | |
parent | b11b3529ce0b60f30d79d865c0827c61959d2b86 [diff] |
[DenseMap] Add a C++17-style try_emplace method. This provides an elegant pattern to solve the "construct if not in map already" problem we have many times in LLVM. Without try_emplace we either have to rely on a sentinel value (nullptr) or do two lookups. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276277 91177308-0d34-0410-b5e6-96231b3b80d8