[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:14 PDT 2024
llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder `openmp-offload-sles-build-only` running on `rocm-worker-hw-04-sles` while building `llvm` at step 5 "compile-openmp".
Full details are available at: https://lab.llvm.org/buildbot/#/builders/140/builds/9528
<details>
<summary>Here is the relevant piece of the build log for the reference</summary>
```
Step 5 (compile-openmp) failure: build (failure)
...
2.006 [6906/32/50] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MathExtras.cpp.o
2.012 [6905/32/51] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/MemAlloc.cpp.o
2.014 [6904/32/52] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DebugCounter.cpp.o
2.053 [6903/32/53] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/APFixedPoint.cpp.o
2.065 [6902/32/54] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/HexagonAttributes.cpp.o
2.075 [6901/32/55] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/DAGDeltaAlgorithm.cpp.o
2.078 [6900/32/56] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ExponentialBackoff.cpp.o
2.088 [6899/32/57] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/AMDGPUMetadata.cpp.o
2.089 [6898/32/58] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/FoldingSet.cpp.o
2.102 [6897/32/59] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
FAILED: lib/Support/CMakeFiles/LLVMSupport.dir/CommandLine.cpp.o
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 -Ilib/Support -I/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support -Iinclude -I/home/botworker/bbot/builds/openmp-offload-sles-build/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-noexcept-type -Wdelete-non-virtual-dtor -Wno-comment -Wno-misleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG -UNDEBUG -std=c++1z -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/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp: In function ‘void ExpandBasePaths(llvm::StringRef, llvm::StringSaver&, const char*&)’:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp:1127:60: error: call of overloaded ‘StringRef(const llvm::StringLiteral&)’ is ambiguous
for (StringRef::size_type TokenPos = ArgString.find(Token);
^
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringMapEntry.h:19:0,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringMap.h:17,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Support/CommandLine.h:26,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp:18:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:103:28: note: candidate: constexpr llvm::StringRef::StringRef(std::string_view)
/*implicit*/ constexpr StringRef(std::string_view Str) : Base(Str) {}
^~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:51:26: note: candidate: constexpr llvm::StringRef::StringRef(const llvm::StringRef&)
class LLVM_GSL_POINTER StringRef : public std::string_view {
^~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:313:26: note: initializing argument 1 of ‘size_t llvm::StringRef::find(llvm::StringRef, size_t) const’
[[nodiscard]] size_t find(StringRef Str, size_t From = 0) const;
^~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp:1129:49: error: call of overloaded ‘StringRef(const llvm::StringLiteral&)’ is ambiguous
TokenPos = ArgString.find(Token, StartPos)) {
^
In file included from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringMapEntry.h:19:0,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringMap.h:17,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/Support/CommandLine.h:26,
from /home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/lib/Support/CommandLine.cpp:18:
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:103:28: note: candidate: constexpr llvm::StringRef::StringRef(std::string_view)
/*implicit*/ constexpr StringRef(std::string_view Str) : Base(Str) {}
^~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:51:26: note: candidate: constexpr llvm::StringRef::StringRef(const llvm::StringRef&)
class LLVM_GSL_POINTER StringRef : public std::string_view {
^~~~~~~~~
/home/botworker/bbot/builds/openmp-offload-sles-build/llvm.src/llvm/include/llvm/ADT/StringRef.h:313:26: note: initializing argument 1 of ‘size_t llvm::StringRef::find(llvm::StringRef, size_t) const’
[[nodiscard]] size_t find(StringRef Str, size_t From = 0) const;
^~~~
2.108 [6897/31/60] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/OptimizedStructLayout.cpp.o
2.111 [6897/30/61] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ErrorHandling.cpp.o
2.164 [6897/29/62] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/ARMAttributeParser.cpp.o
2.172 [6897/28/63] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/InstructionCost.cpp.o
```
</details>
https://github.com/llvm/llvm-project/pull/113752
More information about the llvm-commits
mailing list