summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
diff options
context:
space:
mode:
authorPavel Labath <pavel@labath.sk>2019-01-18 12:52:03 +0000
committerPavel Labath <pavel@labath.sk>2019-01-18 12:52:03 +0000
commit47e9a21d34849b52bbde557f3aacca2941f34092 (patch)
treeacf5460e9a8b9c0a2f8cce87790d7880efeb3bd2 /lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py
parent5e36433189ba3297af33a9088ee17abde10c7871 (diff)
downloadbcm5719-llvm-47e9a21d34849b52bbde557f3aacca2941f34092.tar.gz
bcm5719-llvm-47e9a21d34849b52bbde557f3aacca2941f34092.zip
[ADT] Add streaming operators for llvm::Optional
Summary: The operators simply print the underlying value or "None". The trickier part of this patch is making sure the streaming operators work even in unit tests (which was my primary motivation, though I can also see them being useful elsewhere). Since the stream operator was a template, implicit conversions did not kick in, and our gtest glue code was explicitly introducing an implicit conversion to make sure other implicit conversions do not kick in :P. I resolve that by specializing llvm_gtest::StreamSwitch for llvm:Optional<T>. Reviewers: sammccall, dblaikie Reviewed By: sammccall Subscribers: mgorny, dexonsmith, kristina, llvm-commits Differential Revision: https://reviews.llvm.org/D56795 llvm-svn: 351548
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/value/TestValueAPI.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud