[llvm] [CFIFixup] Factor logic into helpers and use range-based loops (NFC) (PR #125137)

LLVM Continuous Integration via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 12:44:23 PST 2025


llvm-ci wrote:

LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `llvm` at step 5 "build-unified-tree".

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

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

```
Step 5 (build-unified-tree) failure: build (failure)
...
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/clang/lib/Driver/ToolChains/ROCm.h:14:
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Driver/Driver.h:781:19: warning: parameter 'Search' not found in the function declaration [-Wdocumentation]
  /// \param [in] Search and expansion options.
                  ^~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/clang/include/clang/Driver/Driver.h:781:19: note: did you mean 'ExpCtx'?
  /// \param [in] Search and expansion options.
                  ^~~~~~
                  ExpCtx
1 warning generated.
11.310 [1173/30/4937] Building CXX object lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIFixup.cpp.o
FAILED: lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIFixup.cpp.o 
CCACHE_CPP2=yes CCACHE_HASHDIR=yes /usr/bin/ccache /usr/bin/clang++ -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/b/1/clang-x86_64-debian-fast/llvm.obj/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen -I/b/1/clang-x86_64-debian-fast/llvm.obj/include -I/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include -std=c++11 -Wdocumentation -Wno-documentation-deprecated-sync -fPIC -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -O3 -DNDEBUG  -fno-exceptions -funwind-tables -fno-rtti -UNDEBUG -std=c++17 -MD -MT lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIFixup.cpp.o -MF lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIFixup.cpp.o.d -o lib/CodeGen/CMakeFiles/LLVMCodeGen.dir/CFIFixup.cpp.o -c /b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp:83:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/Target/TargetMachine.h:19:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/MC/MCStreamer.h:30:
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/TargetParser/ARMTargetParser.h:267:12: warning: parameter 'Arch' not found in the function declaration [-Wdocumentation]
/// \param Arch the architecture name (e.g., "armv7s"). If it is an empty
           ^~~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/TargetParser/ARMTargetParser.h:267:12: note: did you mean 'MArch'?
/// \param Arch the architecture name (e.g., "armv7s"). If it is an empty
           ^~~~
           MArch
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp:83:
In file included from /b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/Target/TargetMachine.h:19:
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/MC/MCStreamer.h:632:14: warning: parameter 'Sym' not found in the function declaration [-Wdocumentation]
  /// \param Sym - The symbol on the .ref directive.
             ^~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/MC/MCStreamer.h:632:14: note: did you mean 'Symbol'?
  /// \param Sym - The symbol on the .ref directive.
             ^~~
             Symbol
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp:174:10: warning: local variable 'BlockInfo' will be copied despite being returned by name [-Wreturn-std-move]
  return BlockInfo;
         ^~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp:174:10: note: call 'std::move' explicitly to avoid copying
  return BlockInfo;
         ^~~~~~~~~
         std::move(BlockInfo)
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/lib/CodeGen/CFIFixup.cpp:174:10: error: no viable conversion from returned value of type 'SmallVector<[...], 32>' to function return type 'SmallVector<[...], (default) CalculateSmallVectorDefaultInlinedElements<T>::value aka 40>'
  return BlockInfo;
         ^~~~~~~~~
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/ADT/SmallVector.h:1226:3: note: candidate constructor not viable: no known conversion from 'SmallVector<BlockFlags, 32>' to 'std::initializer_list<BlockFlags>' for 1st argument
  SmallVector(std::initializer_list<T> IL) : SmallVectorImpl<T>(N) {
  ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/ADT/SmallVector.h:1236:3: note: candidate constructor not viable: no known conversion from 'SmallVector<BlockFlags, 32>' to 'const llvm::SmallVector<BlockFlags, 40> &' for 1st argument
  SmallVector(const SmallVector &RHS) : SmallVectorImpl<T>(N) {
  ^
/b/1/clang-x86_64-debian-fast/llvm.src/llvm/include/llvm/ADT/SmallVector.h:1246:3: note: candidate constructor not viable: no known conversion from 'SmallVector<BlockFlags, 32>' to 'llvm::SmallVector<BlockFlags, 40> &&' for 1st argument
  SmallVector(SmallVector &&RHS) : SmallVectorImpl<T>(N) {

```

</details>

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


More information about the llvm-commits mailing list