hanchenye-llvm-project/llvm/utils
Pavel Labath 47e9a21d34 [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
2019-01-18 12:52:03 +00:00
..
FileCheck Detect incorrect FileCheck variable CLI definition 2019-01-14 09:29:10 +00:00
KillTheDoctor
LLVMVisualizers Fix visualization of intrusive reference counted objects in MSVC. 2019-01-09 18:59:56 +00:00
Misc
PerfectShuffle
Reviewing Python compat - iteritems() vs. items() 2019-01-03 14:12:23 +00:00
TableGen [WebAssembly] Fixed disassembler not knowing about new brlist operand 2019-01-03 23:01:30 +00:00
Target/ARM Python compat - print statement 2019-01-03 14:11:33 +00:00
UpdateTestChecks [utils] Use operator "in" instead of bound function "has_key" 2018-12-07 09:49:21 +00:00
benchmark Silence CMP0048 warning in the benchmark utility library 2018-12-14 00:17:12 +00:00
bugpoint
count
crosstool
docker Python compat - iteritems() vs. items() 2019-01-03 14:12:23 +00:00
emacs Add fneg instruction to syntax highlighting lists 2018-11-13 19:50:38 +00:00
fpcmp
gdb-scripts Python compat - iterator protocol 2019-01-03 15:43:14 +00:00
git
git-svn git-llvm: Fix incremental population of svn tree. 2018-11-29 16:46:34 +00:00
gn gn build: unbreak mac (and maybe win) after r351258, r351277 2019-01-18 04:09:30 +00:00
jedit
kate Add fneg instruction to syntax highlighting lists 2018-11-13 19:50:38 +00:00
lint Python compat - print statement 2019-01-03 14:11:33 +00:00
lit [lit] Make it possible for the lit test suite to pass with 2019-01-10 17:47:44 +00:00
llvm-build Python compat - print statement 2019-01-03 14:11:33 +00:00
llvm-lit [lit] llvm-lit.in: specify file encoding to UTF-8 2019-01-14 20:02:11 +00:00
not [not] Improve error reporting consistency. 2018-11-09 01:17:22 +00:00
release build_llvm_package.bat: Run more tests 2019-01-17 13:11:15 +00:00
sanitizers Add a ubsan blacklist entry for libstdc++ 8.0.1. 2018-11-21 23:04:39 +00:00
testgen
textmate
unittest [ADT] Add streaming operators for llvm::Optional 2019-01-18 12:52:03 +00:00
valgrind
vim Add fneg instruction to syntax highlighting lists 2018-11-13 19:50:38 +00:00
vscode
yaml-bench
DSAclean.py Python compat - print statement 2019-01-03 14:11:33 +00:00
DSAextract.py Python compat - print statement 2019-01-03 14:11:33 +00:00
GenLibDeps.pl
GetRepositoryPath
GetSourceVersion
LLVMBuild.txt
UpdateCMakeLists.pl
abtest.py utils/abtest: Refactor and add bisection method 2018-09-07 17:08:44 +00:00
bisect
bisect-skip-count Document bisect-skip-count 2018-10-22 14:04:13 +00:00
bugpoint_gisel_reducer.py
check-each-file
clang-parse-diagnostics-file
codegen-diff
collect_and_build_with_pgo.py [utils] collect_and_build_with_pgo.py: revert part already fixed in rL345461 2018-10-27 23:10:09 +00:00
countloc.sh
create_ladder_graph.py Pythran compat - range vs. xrange 2019-01-03 14:11:58 +00:00
demangle_tree.py Python compat - print statement 2019-01-03 14:11:33 +00:00
extract_symbols.py
extract_vplan.py Python compat - print statement 2019-01-03 14:11:33 +00:00
findmisopt
findoptdiff
findsym.pl
getsrcs.sh
indirect_calls.py Python compat - print statement 2019-01-03 14:11:33 +00:00
lldbDataFormatters.py [utils] Update SmallVector lldb formatter for r337514 2018-11-06 18:52:30 +00:00
llvm-compilers-check
llvm-gisel-cov.py Python compat - print statement 2019-01-03 14:11:33 +00:00
llvm-native-gxx
llvm.grm
llvmdo
llvmgrep
prepare-code-coverage-artifact.py [Coverage] Apply filtered paths to summary 2018-10-11 04:00:51 +00:00
schedcover.py Python compat - map/filter 2019-01-03 14:12:30 +00:00
shuffle_fuzz.py Pythran compat - range vs. xrange 2019-01-03 14:11:58 +00:00
shuffle_select_fuzz_tester.py Python compat - print statement 2019-01-03 14:11:33 +00:00
sort_includes.py
unicode-case-fold.py Python compat - urllib 2019-01-03 14:12:44 +00:00
update_analyze_test_checks.py Python compat - no explicit reference to Python version 2019-01-03 15:44:24 +00:00
update_cc_test_checks.py
update_llc_test_checks.py Python compat - no explicit reference to Python version 2019-01-03 15:44:24 +00:00
update_mca_test_checks.py Python compat - no explicit reference to Python version 2019-01-03 15:44:24 +00:00
update_mir_test_checks.py
update_test_checks.py Python compat - no explicit reference to Python version 2019-01-03 15:44:24 +00:00
wciia.py Python compat - print statement 2019-01-03 14:11:33 +00:00