Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
With latest upstream llvm15, we have the following compilation error: <...>/src/cc/bpf_module_rw_engine.cc: In member function ‘int ebpf::BPFModule::annotate()’: <...>/src/cc/bpf_module_rw_engine.cc:404:53: error: ‘class llvm::PointerType’ has no member named ‘getElementType’; did you mean ‘getArrayElementType’? if (StructType *st = dyn_cast<StructType>(pt->getElementType())) { ^~~~~~~~~~~~~~ getArrayElementType In file included from /usr/include/c++/8/memory:80, from /<...>/llvm-project/llvm/build/install/include/llvm/ADT/SmallVector.h:28, from /<...>/llvm-project/llvm/build/install/include/llvm/ADT/MapVector.h:21, from /<...>/llvm-project/llvm/build/install/include/llvm/DebugInfo/DWARF/DWARFContext.h:12, from /<...>/src/cc/bcc_debug.cc:22: /usr/include/c++/8/bits/unique_ptr.h: In instantiation of ‘void std::default_delete<_Tp>::operator()(_Tp*) const [with _Tp = llvm::MCSubtargetInfo]’: /usr/include/c++/8/bits/unique_ptr.h:277:17: required from ‘std::unique_ptr<_Tp, _Dp>::~unique_ptr() [with _Tp = llvm::MCSubtargetInfo; _Dp = std::default_delete<llvm::MCSubtargetInfo>]’ /<...>/src/cc/bcc_debug.cc:136:50: required from here /usr/include/c++/8/bits/unique_ptr.h:79:16: error: invalid application of ‘sizeof’ to incomplete type ‘llvm::MCSubtargetInfo’ static_assert(sizeof(_Tp)>0, ^~~~~~~~~~~ There are two problems here. The first compilation error is due to llvm/llvm-project@d593cf7 where PointerType->getElementType() is removed. The second error is due to https://reviews.llvm.org/D119244 which reshuffles header files which removes MCSubtargetInfo.h from some header files used in bcc_debug.cc. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information