[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:04:03 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `cross-project-tests-sie-ubuntu` running on `doug-worker-1a` while building `llvm` at step 5 "build-unified-tree".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/181/builds/7485
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (build-unified-tree) failure: build (failure)
...
7.633 [4490/8/11] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BinaryStreamReader.cpp.o
7.669 [4489/8/12] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BinaryStreamRef.cpp.o
7.828 [4488/8/13] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BinaryStreamWriter.cpp.o
9.232 [4487/8/14] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BranchProbability.cpp.o
9.556 [4486/8/15] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.o
9.576 [4485/8/16] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/circular_raw_ostream.cpp.o
9.786 [4484/8/17] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFloat.cpp.o
11.206 [4483/8/18] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ConvertEBCDIC.cpp.o
11.258 [4482/8/19] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BalancedPartitioning.cpp.o
11.508 [4481/8/20] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
/opt/ccache/bin/g++ -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/buildbot-root/cross-project-tests-sie-ubuntu/build/lib/Support -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support -I/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/build/include -I/home/buildbot/buildbot-root/cross-project-tests-sie-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 -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/CommandLine.cpp.o -MF lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o.d -o lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o -c /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp: In function ‘void ExpandBasePaths(llvm::StringRef, llvm::StringSaver&, const char*&)’:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp:1127:60: error: call of overloaded ‘StringRef(const llvm::StringLiteral&)’ is ambiguous
1127 | for (StringRef::size_type TokenPos = ArgString.find(Token);
| ^
In file included from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringMapEntry.h:19,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringMap.h:17,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/Support/CommandLine.h:26,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp:18:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:103:28: note: candidate: ‘constexpr llvm::StringRef::StringRef(std::string_view)’
103 | /*implicit*/ constexpr StringRef(std::string_view Str) : Base(Str) {}
| ^~~~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:51:26: note: candidate: ‘constexpr llvm::StringRef::StringRef(const llvm::StringRef&)’
51 | class LLVM_GSL_POINTER StringRef : public std::string_view {
| ^~~~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:313:41: note: initializing argument 1 of ‘size_t llvm::StringRef::find(llvm::StringRef, size_t) const’
313 | [[nodiscard]] size_t find(StringRef Str, size_t From = 0) const;
| ~~~~~~~~~~^~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp:1129:49: error: call of overloaded ‘StringRef(const llvm::StringLiteral&)’ is ambiguous
1129 | TokenPos = ArgString.find(Token, StartPos)) {
| ^
In file included from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringMapEntry.h:19,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringMap.h:17,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/Support/CommandLine.h:26,
from /home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/lib/Support/CommandLine.cpp:18:
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:103:28: note: candidate: ‘constexpr llvm::StringRef::StringRef(std::string_view)’
103 | /*implicit*/ constexpr StringRef(std::string_view Str) : Base(Str) {}
| ^~~~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:51:26: note: candidate: ‘constexpr llvm::StringRef::StringRef(const llvm::StringRef&)’
51 | class LLVM_GSL_POINTER StringRef : public std::string_view {
| ^~~~~~~~~
/home/buildbot/buildbot-root/cross-project-tests-sie-ubuntu/llvm-project/llvm/include/llvm/ADT/StringRef.h:313:41: note: initializing argument 1 of ‘size_t llvm::StringRef::find(llvm::StringRef, size_t) const’
313 | [[nodiscard]] size_t find(StringRef Str, size_t From = 0) const;
| ~~~~~~~~~~^~~
11.521 [4481/7/21] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Chrono.cpp.o
11.618 [4481/6/22] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.o
11.788 [4481/5/23] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Compression.cpp.o
11.831 [4481/4/24] 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