Skip to content

Commit

Permalink
[Hexagon] Fix deprecated call for data layout size in bits (#14438)
Browse files Browse the repository at this point in the history
Fix deprecated call for data layout size in bits
  • Loading branch information
janetsc authored Mar 30, 2023
1 parent 70399da commit 7831a79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/target/llvm/codegen_hexagon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ class CodeGenHexagon final : public CodeGenCPU {
llvm::Module* GetModulePtr() const { return module_.get(); }

uint64_t GetTypeSizeInBits(llvm::Type* type) const {
#if TVM_LLVM_VERSION >= 100
#if TVM_LLVM_VERSION >= 160
return data_layout_->getTypeSizeInBits(type).getFixedValue();
#elif TVM_LLVM_VERSION >= 100
return data_layout_->getTypeSizeInBits(type).getFixedSize();
#else
return data_layout_->getTypeSizeInBits(type);
Expand Down

0 comments on commit 7831a79

Please sign in to comment.