Skip to content

Commit

Permalink
[LLVM] Use DataLayout::getABITypeAlign instead of getABITypeAlignment
Browse files Browse the repository at this point in the history
The latter has been deprecated since LLVM 16.
  • Loading branch information
Krzysztof Parzyszek authored and tqchen committed Apr 8, 2023
1 parent 2eeb37e commit 7e23226
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/target/llvm/codegen_blob.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ std::unique_ptr<llvm::Module> CodeGenBlob(const std::string& data, bool system_l
auto* tvm_dev_mblob_reg = new llvm::GlobalVariable(
*module, int32_ty, false, llvm::GlobalValue::InternalLinkage, constant_zero,
std::string(runtime::symbol::tvm_dev_mblob) + "_reg_");
auto tvm_dev_mblob_reg_alignment = module->getDataLayout().getABITypeAlignment(int32_ty);
auto tvm_dev_mblob_reg_alignment =
#if TVM_LLVM_VERSION >= 110
module->getDataLayout().getABITypeAlign(int32_ty);
#else
module->getDataLayout().getABITypeAlignment(int32_ty);
#endif
#if TVM_LLVM_VERSION >= 100
tvm_dev_mblob_reg->setAlignment(llvm::Align(tvm_dev_mblob_reg_alignment));
#else
Expand Down

0 comments on commit 7e23226

Please sign in to comment.