[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:05:55 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `llvm-nvptx-nvidia-ubuntu` running on `as-builder-7` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
3.350 [2411/128/145] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/benchmark_api_internal.cc.o
3.355 [2410/128/146] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/benchmark_register.cc.o
3.359 [2409/128/147] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/check.cc.o
3.361 [2408/128/148] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/benchmark_runner.cc.o
3.363 [2407/128/149] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/colorprint.cc.o
3.366 [2406/128/150] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/commandlineflags.cc.o
3.370 [2405/128/151] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/complexity.cc.o
3.371 [2404/128/152] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/console_reporter.cc.o
3.378 [2403/128/153] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/csv_reporter.cc.o
3.379 [2402/128/154] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/JSON.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/JSON.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/c++ -DGTEST_HAS_RTTI=0 -DLLVM_EXPORTS -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_GNU_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/lib/Support -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/build/include -I/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/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-redundant-move -Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -fPIC -UNDEBUG -std=c++17  -fno-exceptions -funwind-tables -fno-rtti -MD -MT lib/Support/CMakeFiles/LLVMSupport.dir/JSON.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/JSON.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/JSON.cpp.o -c /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp: In member function ‘llvm::Error llvm::json::Path::Root::getError() const’:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp:229:6: error: ambiguous overload for ‘operator<<’ (operand types are ‘llvm::raw_string_ostream’ and ‘const llvm::StringLiteral’)
  229 |   OS << (ErrorMessage.empty() ? "invalid JSON contents" : ErrorMessage);
      |   ~~ ^~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |   |                           |
      |   llvm::raw_string_ostream    const llvm::StringLiteral
In file included from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/Error.h:25,
                 from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/JSON.h:54,
                 from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/raw_ostream.h:224:16: note: candidate: ‘llvm::raw_ostream& llvm::raw_ostream::operator<<(llvm::StringRef)’
  224 |   raw_ostream &operator<<(StringRef Str) {
      |                ^~~~~~~~
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/raw_ostream.h:265:16: note: candidate: ‘llvm::raw_ostream& llvm::raw_ostream::operator<<(const string_view&)’
  265 |   raw_ostream &operator<<(const std::string_view &Str) {
      |                ^~~~~~~~
In file included from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/JSON.h:1089:27: note: candidate: ‘llvm::raw_ostream& llvm::json::operator<<(llvm::raw_ostream&, const llvm::json::Value&)’
 1089 | inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Value &V) {
      |                           ^~~~~~~~
In file included from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/Error.h:17,
                 from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/Support/JSON.h:54,
                 from /home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-7/ramdisk/llvm-nvptx-nvidia-ubuntu/llvm-project/llvm/include/llvm/ADT/Twine.h:572:23: note: candidate: ‘llvm::raw_ostream& llvm::operator<<(llvm::raw_ostream&, const llvm::Twine&)’
  572 |   inline raw_ostream &operator<<(raw_ostream &OS, const Twine &RHS) {
      |                       ^~~~~~~~
3.383 [2402/127/155] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/json_reporter.cc.o
3.383 [2402/126/156] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/counter.cc.o
3.384 [2402/125/157] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/perf_counters.cc.o
3.387 [2402/124/158] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/UnicodeNameToCodepoint.cpp.o
3.388 [2402/123/159] Building CXX object third-party/benchmark/src/CMakeFiles/benchmark.dir/reporter.cc.o
3.398 [2402/122/160] Building CXX object lib/TableGen/CMakeFiles/LLVMTableGen.dir/Error.cpp.o
3.435 [2402/121/161] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Process.cpp.o
3.435 [2402/120/162] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o
3.538 [2402/119/163] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/raw_socket_stream.cpp.o
3.556 [2402/118/164] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o
3.559 [2402/117/165] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
3.607 [2402/116/166] Building CXX object lib/Extensions/CMakeFiles/LLVMExtensions.dir/Extensions.cpp.o

```

</details>

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


More information about the llvm-commits mailing list