Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compilation error with latest llvm12 trunk
With latest llvm trunk (llvm12), I hit the following compilation error: ... [ 17%] Building CXX object src/cc/frontends/b/CMakeFiles/b_frontend.dir/codegen_llvm.cc.o /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc: In member function ‘virtual ebpf::StatusTuple ebpf::cc::CodegenLLVM::visit_table_decl_stmt_node(ebpf::cc::TableDeclStmtNode*)’: /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc:1122:37: error: ‘class llvm::Module’ has no member named ‘getTypeB yName’; did you mean ‘getName’? StructType *decl_struct = mod_->getTypeByName("_struct." + n->id_->name_); ^~~~~~~~~~~~~ getName This is due to llvm patch https://reviews.llvm.org/D78793 which changed how to use getTypeByName(). This patch adjusted the usage in bcc based on this patch. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information