Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix compilation issues with latest llvm12 trunk
With latest llvm12 trunk, we got two compilation bugs. Bug iovisor#1: /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc: In member function ‘void ebpf::BFrontendAction::DoMiscWorkAround()’: /home/yhs/work/bcc/src/cc/frontends/clang/b_frontend_action.cc:1706:31: error: ‘class clang::SourceManage’ has no member named ‘getBuffer’; did you mean ‘getBufferData’? rewriter_->getSourceMgr().getBuffer(rewriter_->getSourceMgr().getMainFileID())->getBufferSize(), ^~~~~~~~~ getBufferData This is due to upstream change https://reviews.llvm.org/D89394. To fix, follow upstream examples in https://reviews.llvm.org/D89394. Bug iovisor#2: /home/yhs/work/bcc/src/cc/bpf_module.cc: In member function ‘int ebpf::BPFModule::finalize()’: /home/yhs/work/bcc/src/cc/bpf_module.cc:470:11: error: ‘class llvm::EngineBuilder’ has no member named ‘setUseOrcMCJITReplacement’ builder.setUseOrcMCJITReplacement(false); ^~~~~~~~~~~~~~~~~~~~~~~~~ This is due to upstream llvm/llvm-project@6154c41 It seems builder.setUseOrcMCJITReplacement() is not needed any more. So just remove it from bcc. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information