Skip to content
Commit 13200360 authored by Ryan Guo's avatar Ryan Guo
Browse files

[ADT] Add `at` method (assertive lookup) to DenseMap and StringMap

This patch makes it easier for users when they want to use validated
lookup on DenseMap/StringMap as a composable C++ expression. For
instance:

```
// instead of
if (auto val = map.lookup(key))
   return val;
assert("...");

// we can write
return map.at(key);
```

Differential Revision: https://reviews.llvm.org/D143976
parent 2b51c8cd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment