From 7831a79f7fc44f792edb7823f8f24169f8955c7d Mon Sep 17 00:00:00 2001 From: Janet Schneider <21978033+janetsc@users.noreply.github.com> Date: Thu, 30 Mar 2023 13:42:09 -0700 Subject: [PATCH] [Hexagon] Fix deprecated call for data layout size in bits (#14438) Fix deprecated call for data layout size in bits --- src/target/llvm/codegen_hexagon.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/target/llvm/codegen_hexagon.cc b/src/target/llvm/codegen_hexagon.cc index 9552a45a60f9..2adb95f659b9 100644 --- a/src/target/llvm/codegen_hexagon.cc +++ b/src/target/llvm/codegen_hexagon.cc @@ -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);