[ADT] Implicitly convert between StringRef and std::string_view when we have C++17
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 28 Jan 2020 12:51:38 +0000 (13:51 +0100)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 28 Jan 2020 12:56:12 +0000 (13:56 +0100)
commit2e4977965b57c53db81e729e390dbda6807ef7fc
tree8c2363304ebc728b9943e73d6a10ea72ddb61a1d
parentd8de349951c275af86d67eb3e9c7b1f554531a9b
[ADT] Implicitly convert between StringRef and std::string_view when we have C++17

This makes the types almost seamlessly interchangeable in C++17
codebases. Eventually we want to replace StringRef with the standard
type, but that requires C++17 being the default and a huge refactoring
job as StringRef has a lot more functionality.
llvm/include/llvm/ADT/StringRef.h
llvm/unittests/ADT/StringRefTest.cpp