[llvm] [ADT] Teach StringRef to derive from std::string_view (PR #113752)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 26 10:29:37 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `ppc64le-lld-multistage-test` running on `ppc64le-lld-multistage-test` while building `llvm` at step 6 "build-stage1-unified-tree".

Full details are available at: https://lab.llvm.org/buildbot/#/builders/168/builds/4817

<details>
<summary>Here is the relevant piece of the build log for the reference</summary>

```
Step 6 (build-stage1-unified-tree) failure: build (failure)
...
3.890 [5603/202/53] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RewriteRope.cpp.o
3.912 [5603/201/54] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/DebugSubsection.cpp.o
3.913 [5603/200/55] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SipHash.cpp.o
3.937 [5603/199/56] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/CodeViewError.cpp.o
3.941 [5603/198/57] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Regex.cpp.o
3.951 [5603/197/58] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/PluginLoader.cpp.o
3.966 [5603/196/59] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringSaver.cpp.o
3.992 [5603/195/60] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MSP430AttributeParser.cpp.o
4.001 [5603/194/61] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/SourceMgr.cpp.o
4.019 [5603/193/62] Building CXX object lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o
FAILED: lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o 
ccache /usr/lib64/ccache/c++ -DGTEST_HAS_RTTI=0 -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/lib/Option -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/build/stage1/include -I/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wno-uninitialized -Wno-nonnull -Wno-class-memaccess -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -MD -MT lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o -MF lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o.d -o lib/Option/CMakeFiles/LLVMOption.dir/Option.cpp.o -c /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option/Option.cpp
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option/Option.cpp: In member function ‘void llvm::opt::Option::print(llvm::raw_ostream&, bool) const’:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option/Option.cpp:63:16: error: ambiguous overload for ‘operator<<’ (operand types are ‘llvm::raw_ostream’ and ‘const llvm::StringLiteral’)
       O << '"' << Info->Prefixes[I] << (I == N - 1 ? "\"" : "\", ");
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option/Option.cpp:19:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Support/raw_ostream.h:224:16: note: candidate: ‘llvm::raw_ostream& llvm::raw_ostream::operator<<(llvm::StringRef)’
   raw_ostream &operator<<(StringRef Str) {
                ^~~~~~~~
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Support/raw_ostream.h:265:16: note: candidate: ‘llvm::raw_ostream& llvm::raw_ostream::operator<<(const string_view&)’
   raw_ostream &operator<<(const std::string_view &Str) {
                ^~~~~~~~
In file included from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Support/StringSaver.h:14,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Option/OptTable.h:16,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/Option/Option.h:15,
                 from /home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/lib/Option/Option.cpp:9:
/home/buildbots/llvm-external-buildbots/workers/ppc64le-lld-multistage-test/ppc64le-lld-multistage-test/llvm-project/llvm/include/llvm/ADT/Twine.h:572:23: note: candidate: ‘llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::Twine&)’
   inline raw_ostream &operator<<(raw_ostream &OS, const Twine &RHS) {
                       ^~~~~~~~
4.038 [5603/192/63] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/HexagonAttributeParser.cpp.o
4.057 [5603/191/64] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/Formatters.cpp.o
4.058 [5603/190/65] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertUTFWrapper.cpp.o
4.073 [5603/189/66] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Z3Solver.cpp.o
4.119 [5603/188/67] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/StringExtras.cpp.o
4.120 [5603/187/68] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ExponentialBackoff.cpp.o
4.158 [5603/186/69] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/InitLLVM.cpp.o
4.230 [5603/185/70] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ScaledNumber.cpp.o
4.231 [5603/184/71] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TypeSize.cpp.o
4.246 [5603/183/72] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
4.301 [5603/182/73] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/TarWriter.cpp.o
4.319 [5603/181/74] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MD5.cpp.o
4.346 [5603/180/75] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Base64.cpp.o
4.352 [5603/179/76] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/xxhash.cpp.o
4.378 [5603/178/77] Building CXX object lib/DebugInfo/MSF/CMakeFiles/LLVMDebugInfoMSF.dir/MSFCommon.cpp.o
4.438 [5603/177/78] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CSKYAttributeParser.cpp.o
4.441 [5603/176/79] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o
4.470 [5603/175/80] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ToolOutputFile.cpp.o
4.472 [5603/174/81] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/DebugSymbolRVASubsection.cpp.o
4.485 [5603/173/82] Building CXX object lib/DebugInfo/CodeView/CMakeFiles/LLVMDebugInfoCodeView.dir/DebugSymbolsSubsection.cpp.o

```

</details>

https://github.com/llvm/llvm-project/pull/113752


More information about the llvm-commits mailing list