Fix compilation warnings.
authorRong Tao <rongtao@cestc.cn>
Sun, 22 May 2022 09:34:44 +0000 (17:34 +0800)
committerKarol Lewandowski <k.lewandowsk@samsung.com>
Thu, 22 Feb 2024 14:17:55 +0000 (15:17 +0100)
commit27bc84e94cfc5edbd987daaa1d22ec8a6097e83e
treee11db437fb86f12b624b2dad1fb87f4bc57cdd96
parent95bde0ceaca4485c4437183818ba59a524ce199f
Fix compilation warnings.

Compilation warnings:
  /home/rongtao/Git/IO-Visor/bcc/src/cc/bpf_module_rw_engine.cc:60:22: warning: ‘llvm::LoadInst* llvm::IRBuilderBase::CreateLoad(llvm::Value*, bool, const llvm::Twine&)’ is deprecated: Use the version that explicitly specifies the loaded type instead [-Wdeprecated-declarations]
     60 |   return B.CreateLoad(addr, isVolatile);
        |          ~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~
  /home/rongtao/Git/IO-Visor/bcc/src/cc/bpf_module_rw_engine.cc:75:29: warning: ‘llvm::Value* llvm::IRBuilderBase::CreateInBoundsGEP(llvm::Value*, llvm::ArrayRef<llvm::Value*>, const llvm::Twine&)’ is deprecated: Use the version with explicit element type instead [-Wdeprecated-declarations]
     75 |   return B.CreateInBoundsGEP(ptr, idxlist);
        |          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~

See llvm-project https://github.com/llvm/llvm-project/commit/f95d26006e0641385565774ca4b560cc72a84e2f

  [IRBuilder] Deprecate CreateInBoundsGEP() without element type

llvm branch: release/13.x
src/cc/bpf_module_rw_engine.cc