Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix a llvm-triggered compilation error
Upstream (llvm13) patch https://reviews.llvm.org/D97223 changed function signature for CreateAtomicRMW(). The error message: /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc: In member function ‘ebpf::StatusTuple ebpf::cc::CodegenLLVM ::emit_atomic_add(ebpf::cc::MethodCallExprNode*)’: /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc:720:75: error: no matching function for call to ‘llvm::IRBuilder<>::CreateAtomicRMW(llvm::AtomicRMWInst::BinOp, llvm::Value*&, llvm::Value*&, llvm:: AtomicOrdering)’ AtomicRMWInst::Add, lhs, rhs, AtomicOrdering::SequentiallyConsistent); ^ In file included from /home/yhs/work/bcc/src/cc/frontends/b/codegen_llvm.cc:31: /home/yhs/work/llvm-project/llvm/build/install/include/llvm/IR/IRBuilder.h:1721:18: note: candidate: ‘llvm::AtomicRMWInst* llvm::IRBuilderBase::CreateAtomicRMW(llvm::AtomicRMWInst::BinOp, llvm::Value*, llvm::Value*, llvm::MaybeAlign, llvm::AtomicOrdering, llvm::SyncScope::ID)’ AtomicRMWInst *CreateAtomicRMW(AtomicRMWInst::BinOp Op, Value *Ptr, ^~~~~~~~~~~~~~~ /home/yhs/work/llvm-project/llvm/build/install/include/llvm/IR/IRBuilder.h:1721:18: note: candidate expects 6 arguments, 4 provided Fixed the issue with correct arguments. Signed-off-by: Yonghong Song <[email protected]>
- Loading branch information