Work around llvm::PointerType::getElementType() being deprecated in LLVM 14

This commit is contained in:
Martin Kinkelin 2022-03-30 19:51:38 +02:00
parent 101ebce014
commit 8527b3f9c8
9 changed files with 10 additions and 11 deletions

View file

@ -251,7 +251,7 @@ void setRtCompileVar(const Context &context, llvm::Module &module,
assert(nullptr != init);
auto var = module.getGlobalVariable(name);
if (nullptr != var) {
auto type = var->getType()->getElementType();
auto type = var->getValueType();
auto initializer =
parseInitializer(module.getDataLayout(), *type, init,
[&](const std::string &str) { fatal(context, str); });