diff options
| author | Jordan Rose <jordan_rose@apple.com> | 2014-09-29 18:56:08 +0000 |
|---|---|---|
| committer | Jordan Rose <jordan_rose@apple.com> | 2014-09-29 18:56:08 +0000 |
| commit | 59e4e1b5feff4888799636fa18837ca2090a72f5 (patch) | |
| tree | 249ae54c26a1295690ed911982764859838677d4 /llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp | |
| parent | 40424cd6aba4352f1891bce6feb79e9c5a4769f4 (diff) | |
| download | llvm-59e4e1b5feff4888799636fa18837ca2090a72f5.zip llvm-59e4e1b5feff4888799636fa18837ca2090a72f5.tar.gz llvm-59e4e1b5feff4888799636fa18837ca2090a72f5.tar.bz2 | |
Add getValueOr to llvm::Optional<T>.
This takes a single argument convertible to T, and
- if the Optional has a value, returns the existing value,
- otherwise, constructs a T from the argument and returns that.
Inspired by std::experimental::optional from the "Library Fundamentals" C++ TS.
llvm-svn: 218618
Diffstat (limited to 'llvm/unittests/ExecutionEngine/ExecutionEngineTest.cpp')
0 files changed, 0 insertions, 0 deletions
