[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:13:19 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-libc-amdgpu-runtime` running on `omp-vega20-1` while building `llvm` at step 5 "compile-openmp".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/73/builds/7602
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (compile-openmp) failure: build (failure)
...
3.024 [4260/32/37] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/BinaryStreamWriter.cpp.o
3.025 [4259/32/38] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DataExtractor.cpp.o
3.025 [4258/32/39] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Debug.cpp.o
3.028 [4257/32/40] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CSKYAttributeParser.cpp.o
3.029 [4256/32/41] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DynamicAPInt.cpp.o
3.042 [4255/32/42] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntEqClasses.cpp.o
3.043 [4254/32/43] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/IntervalMap.cpp.o
3.066 [4253/32/44] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FloatingPointMode.cpp.o
3.067 [4252/32/45] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CachePruning.cpp.o
3.068 [4251/32/46] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
ccache /usr/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/lib/Support -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Support -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.build/include -I/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Support/CommandLine.cpp
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Support/CommandLine.cpp: In function ‘void ExpandBasePaths(llvm::StringRef, llvm::StringSaver&, const char*&)’:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/ADT/StringMapEntry.h:19,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/ADT/StringMap.h:17,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/Support/CommandLine.h:26,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Support/CommandLine.cpp:18:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/ADT/StringMapEntry.h:19,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/ADT/StringMap.h:17,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/include/llvm/Support/CommandLine.h:26,
from /home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/llvm/lib/Support/CommandLine.cpp:18:
/home/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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/ompworker/bbot/openmp-offload-libc-amdgpu-runtime/llvm.src/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;
| ~~~~~~~~~~^~~
3.068 [4251/31/47] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FormattedStream.cpp.o
3.075 [4251/30/48] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CodeGenCoverage.cpp.o
3.076 [4251/29/49] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Caching.cpp.o
3.218 [4251/28/50] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
```
</details>
https://github.com/llvm/llvm-project/pull/113752
More information about the llvm-commits
mailing list