llvm-project
875d24c2 - [ELF] Avoid list initialization with incomplete unique_ptr<OutputSection> member to work around clang < 16

Commit
319 days ago
[ELF] Avoid list initialization with incomplete unique_ptr<OutputSection> member to work around clang < 16 Commit 5b1b6a62b8bd986adc711d0c0be5b6a8182be263 introduced the following issue for older clang with libstdc++ ``` In file included from /home/ray/llvm/lld/ELF/EhFrame.cpp:18: In file included from /home/ray/llvm/lld/ELF/EhFrame.h:12: In file included from /home/ray/llvm/lld/include/lld/Common/LLVM.h:21: In file included from /home/ray/llvm/llvm/include/llvm/Support/Casting.h:20: In file included from /usr/lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/memory:78: /usr/lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_ptr.h:91:16: error: invalid application of 'sizeof' to an incomplete type 'lld::elf::OutputSection' static_assert(sizeof(_Tp)>0, ^~~~~~~~~~~ /usr/lib64/gcc/x86_64-pc-linux-gnu/14.2.1/../../../../include/c++/14.2.1/bits/unique_ptr.h:398:4: note: in instantiation of member function 'std::default_delete<lld::elf::OutputSection>::operator()' requested here get_deleter()(std::move(__ptr)); ^ /home/ray/llvm/lld/ELF/Config.h:574:19: note: in instantiation of member function 'std::unique_ptr<lld::elf::OutputSection>::~unique_ptr' requested here OutSections out{}; ^ ```
Author
Parents
Loading