diff options
author | Fangrui Song <i@maskray.me> | 2024-11-17 10:16:01 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-11-17 10:16:01 -0800 |
commit | 875d24c2302cf0194fdd44b012623f395a705863 (patch) | |
tree | 4ae0ebd81534db9e2f9cf6243e86c392bb0e2237 /llvm/lib/CodeGen/MachineModuleInfo.cpp | |
parent | 2d7ec7f0d39cb4b816fc9b9d535519c726980121 (diff) | |
download | llvm-875d24c2302cf0194fdd44b012623f395a705863.zip llvm-875d24c2302cf0194fdd44b012623f395a705863.tar.gz llvm-875d24c2302cf0194fdd44b012623f395a705863.tar.bz2 |
[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{};
^
```
Diffstat (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp')
0 files changed, 0 insertions, 0 deletions