[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 11:11:06 PDT 2024


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `lld-x86_64-ubuntu-fast` running on `as-builder-4` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
2.555 [3703/64/67] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FileOutputBuffer.cpp.o
2.562 [3702/64/68] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MSP430Attributes.cpp.o
2.580 [3701/64/69] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Optional.cpp.o
2.590 [3700/64/70] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ModRef.cpp.o
2.593 [3699/64/71] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/UnicodeNameToCodepointGenerated.cpp.o
2.651 [3698/64/72] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RISCVAttributes.cpp.o
2.692 [3697/64/73] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RewriteBuffer.cpp.o
2.702 [3696/64/74] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/OptionStrCmp.cpp.o
2.731 [3695/64/75] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Parallel.cpp.o
2.732 [3694/64/76] 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 -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-4/ramdisk/lld-x86_64/build/lib/Support -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/build/include -I/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/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 -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-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support/JSON.cpp
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support/JSON.cpp: In member function ‘llvm::Error llvm::json::Path::Root::getError() const’:
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/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-4/ramdisk/lld-x86_64/llvm-project/llvm/include/llvm/Support/Error.h:25,
                 from /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/include/llvm/Support/JSON.h:54,
                 from /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/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-4/ramdisk/lld-x86_64/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-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/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-4/ramdisk/lld-x86_64/llvm-project/llvm/include/llvm/Support/Error.h:17,
                 from /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/include/llvm/Support/JSON.h:54,
                 from /home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/llvm-project/llvm/lib/Support/JSON.cpp:9:
/home/buildbot/worker/as-builder-4/ramdisk/lld-x86_64/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) {
      |                       ^~~~~~~~
2.755 [3694/63/77] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.o
2.804 [3694/62/78] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/GraphWriter.cpp.o
2.829 [3694/61/79] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MemoryBuffer.cpp.o
2.837 [3694/60/80] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signposts.cpp.o
2.880 [3694/59/81] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MD5.cpp.o
2.980 [3694/58/82] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Error.cpp.o
3.053 [3694/57/83] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RISCVISAUtils.cpp.o
3.056 [3694/56/84] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/RewriteRope.cpp.o
3.088 [3694/55/85] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FileCollector.cpp.o
3.095 [3694/54/86] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MSP430AttributeParser.cpp.o
3.112 [3694/53/87] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Regex.cpp.o
3.120 [3694/52/88] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Caching.cpp.o

```

</details>

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


More information about the llvm-commits mailing list