[PATCH] D132049: [BOLT] Towards FunctionLayout const-correctness
Fabian Parzefall via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 24 10:46:38 PDT 2022
FPar added a comment.
In D132049#3746425 <https://reviews.llvm.org/D132049#3746425>, @haowei wrote:
> We are seeing clang build warnings and errors after this patch was landed. Error message:
>
> In file included from /b/s/w/ir/x/w/llvm-llvm-project/bolt/include/bolt/Core/BinaryBasicBlock.h:18:
> /b/s/w/ir/x/w/llvm-llvm-project/bolt/include/bolt/Core/FunctionLayout.h:307:62: error: no viable conversion from returned value of type 'reverse_iterator<const_iterator>' to function return type 'reverse_iterator<block_const_iterator>'
> block_const_reverse_iterator block_rbegin() const { return Blocks.rbegin(); }
> ^~~~~~~~~~~~~~~
> /b/s/w/ir/x/w/cipd/bin/../include/c++/v1/__iterator/reverse_iterator.h:43:28: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'const_reverse_iterator' (aka 'reverse_iterator<llvm::bolt::BinaryBasicBlock *const *>') to 'const std::reverse_iterator<llvm::pointer_iterator<llvm::pointee_iterator<llvm::bolt::BinaryBasicBlock *const *, const llvm::bolt::BinaryBasicBlock>, const llvm::bolt::BinaryBasicBlock *>> &' for 1st argument
> class _LIBCPP_TEMPLATE_VIS reverse_iterator
> ^
> /b/s/w/ir/x/w/cipd/bin/../include/c++/v1/__iterator/reverse_iterator.h:43:28: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'const_reverse_iterator' (aka 'reverse_iterator<llvm::bolt::BinaryBasicBlock *const *>') to 'std::reverse_iterator<llvm::pointer_iterator<llvm::pointee_iterator<llvm::bolt::BinaryBasicBlock *const *, const llvm::bolt::BinaryBasicBlock>, const llvm::bolt::BinaryBasicBlock *>> &&' for 1st argument
> /b/s/w/ir/x/w/cipd/bin/../include/c++/v1/__iterator/reverse_iterator.h:119:5: note: candidate template ignored: requirement 'is_convertible<llvm::bolt::BinaryBasicBlock *const *const &, llvm::pointer_iterator<llvm::pointee_iterator<llvm::bolt::BinaryBasicBlock *const *, const llvm::bolt::BinaryBasicBlock>, const llvm::bolt::BinaryBasicBlock *>>::value' was not satisfied [with _Up = llvm::bolt::BinaryBasicBlock *const *]
> reverse_iterator(const reverse_iterator<_Up>& __u)
> ^
> /b/s/w/ir/x/w/cipd/bin/../include/c++/v1/__iterator/reverse_iterator.h:113:14: note: explicit constructor is not a candidate
> explicit reverse_iterator(_Iter __x) : current(__x) {}
>
> Could you take a look? If it takes a while to fix. Could you revert your change please?
>
> Full build task: https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8804929257456173105/overview
> Full build step output: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8804929257456173105/+/u/clang/build/stdout
Sorry, I'll revert it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132049/new/
https://reviews.llvm.org/D132049
More information about the llvm-commits
mailing list